Enterprise Java for Linux HOWTO 
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. 
For JDK 1.2.2, you don t need to initially add any JARs to your CLASSPATH. JARs can be packaged in
either .jar or .zip files. 
export CLASSPATH=$CLASSPATH:.
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: 
Hello, World!
Congratulations, you have installed, set up an environment for, and tested the Blackdown JDK on Linux. 
More Information 
For more information on the Blackdown JDK, see the Blackdown website at 
http://www.blackdown.org
.
There is an excellent FAQ available. 
Confirming Your Installation 
6






footer




 

 

 

 

 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