When a Java program is launched from a Web page, the program is called a Java "applet." When run without the Web browser on a user's machine, it is a Java "application." When running in a Web server, it is a Java "servlet."
Intermediate Bytecode
The source code of a Java program is compiled into an intermediate language called "bytecode." In order to run the bytecode, it must be compiled into machine code just before execution or a line at a time via the Java Virtual Machine (JVM) runtime engine. There are JVMs for all major hardware platforms, and this intermediate bytecode is what makes Java cross platform. See Java Virtual Machine and JIT compiler.
Java Vs. JavaScript
Java is a full-blown programming language, whereas JavaScript is a scripting language that is much more limited. JavaScript source code is not compiled into bytecode. It is embedded within an HTML page and is primarily used to manipulate elements on the page itself. For example, it is widely used to provide drop-down menus and other interactive events on the page. See JavaScript.
A Revolution?
Developed in 1991 as a language for embedded applications in set-top boxes and other consumer electronics, Java ignited a revolution when Sun transitioned it to the Web in 1994. Thus far, Java applets and applications have been mildly successful on the client, but Java on the server side has become very popular. See J2EE.
Write Once-Run Anywhere
Java embodies the "write once-run anywhere" model; the Holy Grail of computing for decades. For example, a Java servlet can be moved from a Unix server to a Windows server if both have the Java runtime engine installed. Sometimes, a little tweaking is necessary; sometimes a lot, but Java is closer to "write once-run anywhere" than previous development platforms. See Java platform, servlet, JSP, Java 2, Jini, network computer, CaffeineMark and caffeine based.
The following Java example of changing Fahrenheit to Celsius is rather wordy compared to the C example in this encyclopedia. Java is designed for GUI-based applications, and several extra lines of code are necessary here to allow input from a terminal.
import java.io.*;
class Convert {
public static void main(String[]args)
throws IOException {
float fahr;
StreamTokenizer in=new StreamTokenizer(new
InputStreamReader(System.in));
System.out.print("Enter Fahrenheit ");
in.nextToken();
fahr = (float) in.nval;
System.out.println ("Celsius is " +
(fahr-32)*5/9);
}
}
Java Uses an Intermediate Language
Java source code is compiled into an intermediate language called "bytecode." The bytecode can be run in any hardware that has a Java Virtual Machine (JVM) for that machine platform. Thus, the "write once-run anywhere" concept.
Java Runs on Clients and Servers
When a Java program has been called by a Web page from the client machine, it is dubbed an "applet." When it runs on the server, it is known as a "servlet." When running stand alone in a user's computer, it is a Java "application."
![]() | Reproduced with permission from Computer Desktop Encyclopedia. Copyright (c) 1981-2009 The Computer Language Company Inc. All rights reserved. |
Additional Resources
- Hint of things to come in Java IDEs?
- fsadWith blu ray ripper *, you can easily rip Blu Ray movies to SD/HD video formats.
- Discussion threads 2009-11-20
- Chrome OS - The good, the bad and the ugly, and how it fits in with Windows, Mac and Linux
- Chrome OS - The good, the bad and the ugly, and how it fits in with WindowsI gave it some thought too and realized that Chrome OS only has the bad and the ugly. There is nothing good about it. All data stored in the cloud, and on Google's...
- Discussion threads 2009-11-20
- iNMR 3.3.7 (Mac)
- Today you can find many alternative NMR applications that run on Mac OS X, and all of them have been ported from some other operative system. Under a minimal cosmetic retouch, they still sport the original interface, be it X11, Windows95 or Windows XP. Some alternatives are written in Java,...
- Software downloads 2009-11-20
- Terracotta buys Quartz
- Open source Java clustering software developer Terracotta announced its intent to buy an open source job scheduler known as Quartz. The integration of Quartz into Terracotta's platform will ease high availability job scheduling and scaling applications to multiple nodes, the company said. Quartz is currently integrated into...
- Blog posts 2009-11-19
- Deductions 1.1.2 (Mac)
- Deductions is educational software designed to help students learn proofs in formal logic. It is intended to be used by instructors and students of college-level logic courses in philosophy, mathematics and computer science. It gives immediate feedback at each stage of a proof, provides hints about how to complete proofs,...
- Software downloads 2009-11-19
- Microsoft shares a few tidbits on IE9 and (lots) more on Silverlight 4
- Safari? What Safari ? :-)http://www.tgdaily.com/software-features/39495-safari-4-beta-first-browser-to-hit-100-score-in-acid3-testI know, Steve doesn't like Apple but you're supposed to be a journalist? ;-)Google chrome?IE like Microsoft is stumbling around in a new ecosystem in which spending thousands of dollars is not an option.Plus, it locks you into a insecure OS platform with...
- Discussion threads 2009-11-18
- NoScript 1.9.9.15 (Windows)
- NoScript provides extra protection for your Mozilla/Firefox or Flock browser: this extension allows JavaScript and Java execution only for trusted domains of your choice. This whitelist based pre-emptive script blocking approach prevents exploitation of security vulnerabilities with no loss of functionality. You can enable JavaScript/Java execution for sites you trust...
- Software downloads 2009-11-18
- Blue Iris 2.32 (Windows)
- Video Capture. Use up to 25 cameras (Webcams, camcorders, network IP cams, analog cards, or your PC desktop). Capture JPEG snapshots or capture movies in standard AVI, advanced DVR, or leading-edge Windows Media file formats. Video Security. Keep an eye on your home, place of business, cars, and valuables; watch...
- Software downloads 2009-11-18
- RazorSQL 5.0.2 (Mac)
- Query, edit, browse, and manage all major databases from one database tool. RazorSQL OSX is a universal database query tool, programming and sql editor, database navigator, and administration tool with built-in connection capabilities for DB2, Derby, Firebird, FrontBase, HSQLDB, Informix, Microsoft SQL Server, MySQL, OpenBase, Oracle, PostgreSQL, SQL Anywhere, SQLite,...
- Software downloads 2009-11-18
- install4j 4.2.5 (Windows)
- install4j is a cross platform Java installer that produces native launchers and installers for all major platforms. Install4j offers an intuitive GUI that makes it easy to quickly define installation projects. A command line compiler and integration for Apache ANT are included.
- Software downloads 2009-11-18
- Altova MissionKit for Enterprise Software Architects 2010 (Windows)
- The Altova MissionKit 2010 for Enterprise Software Architects is an integrated suite of XML, database, and UML tools from the developers of XMLSpy. It delivers eight tools for less than the price of two! The Altova MissionKit for Enterprise Software Architects includes Enterprise Editions of Altova XMLSpy, MapForce, StyleVision, UModel,...
- Software downloads 2009-11-17
- EvoCam 3.6.6 (Mac)
- Run your own webcam! Ever wanted a webcam so that visitors to your site can see a live image of you, your office, or the view out of your window? Ever wanted to keep an eye on your home or your pets while you're away? If so, you need the...
- Software downloads 2009-11-17
- Altova UModel Professional Edition 2010 (Windows)
- Altova UModel Professional Edition is the simple, cost-effective way to draw on UML. Use UModel to create and interpret software designs with the power of UML 2.2. Design application models and generate Java, C#, or Visual Basic .NET code. Reverse engineer existing programs into clear, accurate UML diagrams to quickly...
- Software downloads 2009-11-17
- Altova UModel Enterprise Edition 2010 (Windows)
- Altova UModel Enterprise Edition is the starting point for successful software development. Use UModel to create and interpret software designs via the power of UML 2. Design application models and generate Java, C#, or Visual Basic .NET code. Reverse engineer existing programs into clear, accurate UML diagrams to quickly analyze...
- Software downloads 2009-11-17
- Serv-U 9.1 (Windows)
- Serv-U is a powerful, easy-to-use, award-winning File Server from RhinoSoft.com. Serv-U supports the FTP, HTTP, and SFTP protocols to ensure maximum compatibility with the widest range of transfer client software. With support for industry-standard SSL encryption, Serv-U protects your data while it's in transit. A powerful Web-based interface allows administrators...
- Software downloads 2009-11-17
- Netbooks dead? Not when sales are up 264% percent
- My prediction:Intel and MS and the major brands are trying to drag the market upwards in size and cost to maintain their margins. They will shortly face a barrage of products based on ARM class processors and Linux (Chrome?), which will cost much less and have much better battery lives....
- Discussion threads 2009-11-16
- Altova XMLSpy Enterprise Edition 2010 (Windows)
- Altova XMLSpy 2010 Enterprise Edition is the industry's best-selling XML editor and XML development environment for modeling, editing, transforming, and debugging XML technologies. In addition to the world's leading XML editor, XMLSpy includes a powerful graphical XML Schema editor that allows you to design complex schemas with ease. Advanced error...
- Software downloads 2009-11-16
- Altova XMLSpy Professional Edition 2010 (Windows)
- Altova XMLSpy 2010 Professional Edition is the industry-leading XML editor and XML development environment, with intuitive editing views and powerful XML utilities to model, edit, transform, and debug XML-related technologies quickly and easily. In addition to the world's most popular XML editor, XMLSpy Professional includes a graphical XML Schema editor...
- Software downloads 2009-11-16
- Altova MapForce Enterprise Edition 2010 (Windows)
- Altova MapForce 2010 Enterprise Edition is a graphical data mapping, conversion, and integration tool. This award-winning application lets you map between any combination of XML, database, flat file, EDI, Microsoft Excel 2007, XBRL, and/or Web service. Then it transforms data instantly or autogenerates royalty-free application code for the execution of...
- Software downloads 2009-11-16
- Altova MapForce Professional Edition 2010 (Windows)
- Altova MapForce 2010 Professional Edition is a graphical data mapping tool for transforming between XML, database, and flat file formats. This award-winning visual data mapper converts data instantly or autogenerates royalty-free application code for execution of recurrent conversions. Simply open sources and targets, drop in data processing functions from the...
- Software downloads 2009-11-16
Neighboring Terms
Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors
- Save time with automated shipping solutions
-
The Business Essentials Guide provides you useful tools and templates to help grow your business and save you time with automated shipping solutions.
- Visit the UPS Business Essentials Guide
- Reduce risk. Reduce complexity. Increase reliability.
-
A simplified IT environment isn't just less complex. It's also more reliable. Standardize on a single Linux platform with SUSE Linux Enterprise from Novell, and get the world's most interoperable Linux

- Learn more >>
- The more you simplify, the more you save
-
When you transition from your existing Red Hat environment to SUSE Linux Enterprise from Novell, you can recognize dramatic cost savings, perhaps as much 50%

- Learn more >>
- New Online Dashboard for IT Leaders
-
Read about top issues IT decision-makers face every day, plus get cost-effective solutions to real-life IT problems.
- Learn more >>
-
-
Smart Tech
Expert advice on innovations in healthcare and the green technologies that make it happen.
Find out more
-
Smart Business
Discussion and advice on management issues that revolve around making your world smarter and more useful.
More Smart Advice
-
Smart People
The best and worst moves in the management and strategy trenches.
Learn More



