Friday, July 28, 2017

Environment setup


Requirements to write Java Applications

  1. For executing any java program, you need to install the JDK if you don't have installed it.
  2. Set path of the jdk/bin directory. 
  3. create the java program
  4. compile and run the java program

Path

      Path variable is set for providing path for all Java tools like java, javac, javap, javah, jar, appletviewer. In Java to run any program we use java tool and for compile Java code use javac tool. All these tools are available in bin folder so we set path upto bin folder.

classpath

      classpath variable is set for providing path of all Java classes which is used in our application. All classes are available in lib/rt.jar so we set classpath upto lib/rt.jar.


No comments:

Post a Comment