Class Path

Why should we set class path and path environment variables while installing J2SE and why not while Turbo C?

Questions by periaganesh

Showing Answers 1 - 9 of 9 Answers

arul_99

  • Jan 28th, 2009
 

Set the PATH variable if you want to be able to conveniently run the Java 2 SDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:
C:> jdk1.3.1_binjavac MyClass.java
It's useful to set the PATH permanently so it will persist after rebooting.

  Was this answer useful?  Yes

mnazhar

  • Apr 9th, 2009
 

Because TurboC generates .exe files which include all the libraries and runtime references.
While in Java generates .class files which requires JRE/JDK libraries at runtime which are searched in CLASSPATH. if you do not specify required libraries files then program will display ClassNotFoundException.

regards

  Was this answer useful?  Yes

richakharya

  • Apr 10th, 2009
 

Set the PATH variable if you want to be able to conveniently run the JDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:

    C:> "Program FilesJavajdk1.6.0_<version>binjavac" MyClass.java 
It's useful to set the PATH permanently so it will persist after rebooting.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions