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
- iPhone Chat Server (123FlashChat) 7.5 (Windows)
- iPhone Chat Server Software by 123FlashChat can add a chat room to your Web site in minutes. It organizes chat events or online meetings for social network or portals. Technology utilized: Java chat server and various chat client. It is secure, easy and affordable. It has text and video chat...
- Software downloads 2009-11-05
- Oracle giving EU a hard time over Sun buy
- Oh my, must not up set the crazy EU.Pfttt....A small question why EU can stop or affect a deal inside usa ..... or is the deal is global ....Also we EU dont fork MYSQL into something purely EU ... and tell Oracle to go to hell. If the...
- Discussion threads 2009-11-04
- Java Runtime Environment (JRE) 6 Update 17 (Windows)
- The Java Runtime Environment JRE provides the libraries, the Java Virtual Machine, and other components to run applets and applications written in the Java programming language. In addition, two key deployment technologies are part of the JRE: Java Plug-in, which enables applets to run in popular browsers; and Java Web...
- Software downloads 2009-11-04
- JumpBox for Tomcat Java Web Application Deployment 1.1.1 (Mac)
- Apache Tomcat is an open source servlet container that implements the Java Servlet and the JavaServer Pages specifications. Like other deployment JumpBoxes, the JumpBox for Tomcat makes it easy to deploy a web application (specifically a java-based web application). Notable features of this JumpBox include: Flexible deployment options: Applications...
- Software downloads 2009-11-03
- JabRef 2.6b2 (Mac)
- JabRef is a graphical application for managing bibliographical databases. JabRef is designed specifically for BibTeX bases, but can import and export many other bibliographic formats. JabRef runs on all platforms and requires Java 1.5 or newer.
- Software downloads 2009-11-01
- 360Works ScriptMaster 3.22 (Mac)
- ScriptMaster is a free, general-purpose, modular FileMaker plugin. It comes out of the box with modules for file manipulation, URL and network utilities, Web Services, shell scripting, event/script triggering, and many others. ScriptMaster integrates tightly with your FileMaker solution. You can pass in any number of inputs, receive any number...
- Software downloads 2009-10-30
- jalada Textual 2.5 (Mac)
- jalada Textual is your Swiss Army Knife to edit any kind of text based files. Whether you simply need a tool to edit your configuration files, an application to modify or reformat large text files, a programming IDE or just an editor to tweak your web pages. Textual does what...
- Software downloads 2009-10-30
- Microsoft adds more choices for developers targeting its Azure cloud
- Microsoft is getting its Azure ducks before it removes the beta tag from its cloud service in mid-November. On October 28, the company announced plans for more development tools aimed at programmers who want to use PHP, Java and the Eclipse IDE to create and modify Web applications for Azure....
- Blog posts 2009-10-29
- Deductions 1.1.1 (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-10-29
- Opera browser dinged by code execution flaw
- Just think.MS is being forces to promote these things in Europe.Just think.For every single flaw in one of "these things", there are over a dozen in IE.Opera is great.Ultimately customizable, fast, and for some reason have no clue why all pages are crisper/more clear on Opera than on other browsers....
- Discussion threads 2009-10-28
- Microsoft partners to allow Eclipse interop on Win7, WinServer 2008 R2, Azure
- Microsoft has made another play at interoperability with a key open source software offering. At Eclipse Summit Europe on Wednesday, the Redmond, Wash. software giant announced that it is working on four open source projects with two open source companies -- Tasktop Technologies and Soyatec -- to...
- Blog posts 2009-10-28
- ImageJ 1.43j (Mac)
- ImageJ is a public domain Java image processing program inspired by NIH Image for the Macintosh. It runs, either as an online applet or as a downloadable application, on any computer with a Java 1.1 or later virtual machine. It can display, edit, analyze, process, save and print 8-bit, 16-bit...
- Software downloads 2009-10-28
- 123 Flash Chat Software 7.5 (Mac)
- 123 Flash Chat Server Software can add a chat room to your website in minutes. It organizes chat events or online meetings for social network or portals, etc. Technology utilized: Java chat server and Flash chat client. It is secure, easy and affordable. It has text and video chat included,...
- Software downloads 2009-10-28
- NoScript 1.9.9.14 (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-10-28
- Aquamacs Emacs 2.0preview3 (Mac)
- Aquamacs is a Mac-like distribution of the powerful Emacs text editor. It looks and behaves like a Mac program - even though it's still GNU Emacs with all the extensibility that millions have come to appreciate.Emacs is a text editor of legendary power and configurability, but it also has an...
- Software downloads 2009-10-28
- New LoroBot ransomware encrypts files, demands $100 for decryption
- You forgot to mention....which OSs it affects! Or is it based on something multi-platform like Java?Look at the bigger size version of the screenshot, it's all in thereA lot of russian characters and...YES, you guessed it right, the word "windows" prominently displayed in red in the title.Who would ever thought...
- Discussion threads 2009-10-27
- WebPicker 5.0 (Windows)
- WebPicker is a Windows application that helps you collect, manage, and distribute Web information while you surf the Internet. Each time you find a Web page, or a portion of a page, that you wish to keep for future reference, simply save it to the WebPicker library. With a single...
- Software downloads 2009-10-27
- Snappy Snippets 1.0.6 (Windows)
- Snappy Snippets is a code snippet organiser for use with any programming, scripting or markup language. Ideal for use with HTML, PHP, CSS, Visual Basic, Visual C++, Java, RealBasic etc... It's features include Tree view of snippets allows easy navigation to the required code. Copy to the clipboard or use...
- Software downloads 2009-10-27
- NaviCoder Editor 2.0 (Windows)
- NaviCoder Editor is a professional source code editor for Windows. It is useful for people who work with various programming environments such as PHP, HTML, C/C++, Perl and Java. NaviCoder Editor is written in C++ and professionally designed for the best look and feel. It is not only fast in...
- Software downloads 2009-10-27
- Linux in your hand; from geeks only to consumer friendly mass market
- someone has discovered americasome people knew about that years ago...Umm. Android is Java on Linux.Read the Wikipedia entry if you don't believe me.I think you'll love Android then.Buh Bye Linux.Ah, DonThe usual display of razor-sharp analysis backed by exhaustive research.It only matters if the device is runningLinux if I can...
- Discussion threads 2009-10-26
Neighboring Terms
Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors
Meet Doc
-
Here to help you with your Document Management Needs
- Doc is an enigma. Born to a Russian ballerina and a German electrical engineer, he grew up in various locations in the United States. He’s seen the insides of more brands, versions, and generations of printer and printer-related hardware than almost anyone.
- To learn more about this mysterious figure check out his blog on ZDNet and his Workspace on TechRepublic. You’ll be glad you did.
-
Produced by
ZDNet and



