Java is a general-purpose, concurrent, class-based, object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users. Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.

The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1991 and first released in 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.


Compute Systems Invocation Version(s)
Red Hat Linux (64-bit)

% /util/bin/javac
% /util/bin/java filename

9.0.4 (default)


  1. HelloWorld. Compile and run, attached below:
    % javac
    % java HelloWorld
  2. MathLibraryExample. Compile and run, attached below:
    % javac
    % java MathLibraryExample


  1. Find out which version of java you're running:
    % java -version
    % java -fullversion
  2. Even if you're using the default /usr/bin/java, you might still find the documentation in /usr/j2se/docs/ useful.
  3. CLASSPATH. If you need to set your CLASSPATH environment variable, make sure that the that you use is the one that corresponds to the java interpreter that you're using. But note that Java 1.2 does not require its main classes file to be in your CLASSPATH. For example, if you're using the Java from /util/jdk1.1.8/, then the to use is /util/jdk1.1.8/lib/ If you have a from a Java version other than the java that you're using, bad things will happen, even if they're both the same "version".


  2. (Java home and download site)
  3. (Java developers' homepage)
  4. (The Java Tutorials)
  5. (New to Java Programming Center)
  6. (Test Your Java Virtual Machine (JVM))
  7. (Examples of java.lang.Math Methods)
HelloWorld.java121 bytes
MathLibraryExample.java4.71 KB
Echo.java1.46 KB