GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 889 of 928    Print  
Class Path
Why should we set class path and path environment variables while installing J2SE and why not while Turbo C?


  
Total Answers and Comments: 3 Last Update: April 10, 2009     Asked by: periaganesh 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 28, 2009 05:02:30   #1  
arul_99 Member Since: December 2008   Contribution: 1    

RE: Class Path
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.

 
Is this answer useful? Yes | No
April 09, 2009 04:14:00   #2  
mnazhar Member Since: April 2009   Contribution: 1    

RE: Class Path
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

 
Is this answer useful? Yes | No
April 10, 2009 04:12:48   #3  
richakharya Member Since: December 2007   Contribution: 11    

RE: Class Path
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.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape