Enterprise Java for Linux HOWTO 
Developer Kit. 
export JAVA_HOME=/usr/local/ibm/jdk118
The $JAVA_HOME/bin directory has the Java compiler (javac) and the Java Virtual Machine (java) as well
as other necessary programs for development. Add $JAVA_HOME/bin to your PATH. 
export PATH=$JAVA_HOME/bin:$PATH
Note that $JAVA_HOME/bin was added to the front of the PATH so that the installed JDK will be used
rather than any JDK that might have come with your Linux distribution. 
To confirm that your PATH is correctly set up, check which Java compiler and JVM will be used. 
which javac
which java
The output should reference javac and java in your $JAVA_HOME/bin directory. 
The CLASSPATH environment variable references all JARs and directories that you will need to compile
and run Java programs. 
Initially I suggest adding the following JARs to your CLASSPATH. JARs can be packaged in either .jar or
.zip files. 
For instance: 
export CLASSPATH=$JAVA_HOME/lib/classes.zip
Confirming Your Installation 
You are now ready to compile and run a simple application.  Create the following program. 
class HelloWorld {
  public static void main (String[] args) {
    System.out.println("Hello, World!");
Compile the program with the Java compiler. 
javac HelloWorld.java
If the compiler produces errors, double check the syntax and confirm your PATH and CLASSPATH. 
Run the program with the JVM. 
java HelloWorld
If the JVM produces errors, confirm your PATH and CLASSPATH. 
You should see the following output: 
Confirming Your Installation 






 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java web hosting


Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved