Archive

Archive for the ‘Java Installation & Configuration’ Category

Java Installation & Configuration

August 18, 2009 4 comments

 

 

Java is freely downloadable from Sun’s website (http://developers.sun.com/downloads/) . What’s to decide is which version to chose? At the time of this post, recommended Java versions are 1.4 , 1.5 and 1.6. While Java 1.4 has been in the field for quiet few years and personified as a de-facto across wide range of applications and industry choice, Java 1.5 has made its advent to an extent that many Java applications across the globe are now migrating to 1.5. Reason being simple, Java is backward compatible and richer features of Java 1.5. While Java 1.4 has persisted to demonstrate reliability, Java 1.5 has proved to be more plenteous. Relatively recent arrival of Java 1.6 has its share of the buzz with more features in the kit. Now, we have a sneak peak into Java 1.7 available as well. With every new release, new features in Java will be explored. As this post’s focus is on the installation/configuration facet, we shall keep the discussion of java versions, features, pros & cons as an open topic.

Many times, there’s confusion about PATH / CLASSPATH/ JAVA_HOME variables. What they actually are and how they matter? Or if its really necessary to set them, if so how to set them? Below we try to answer all the questions that matter.

The following sections describe:-

  • Downloading Instructions – Describes where and what to to download.
  • Installing Instructions – Describes how to install Java into a location in the computer.
  • Configuration Instructions – Describes how to set up a computer to write java programs and also execute them.

 

In brief:

  • Download Java (JDK – if you want to write and run your own java programs / JRE – if you only want to run java programs) from Sun’s website. (Chose your java version)
  • Once downloaded, install Java to any location on your computer
  • Set environment variables (PATH / CLASSPATH / JAVA_HOME – all optional and set for convinience) in your computer.
  • Set PATH to (java installed location)/JDK_verstion/bin (optional)
  • Set CLASSPATH to (java installed location)/JDK_verstion/lib/tools.jar (optional)
  • Set JAVA_HOME to (java installed location)/JDK_verstion (optional)

If you are using any IDE for working on java, you dont even have to set the environment variables, as the IDE itself ships with a support for a Java version. You have to set the environment variables most likely in situations like:

  • You want to work with simple text editors like notepad
  • You want to work with certain java dependant softwares like Ant, Glassfish, Tomcat etc which need java environment variables to be set.

Refer below detailed description for more information.

 

 

Downloading Instructions: Read more…

Advertisements