Jump to content

what is path and classpath in java


vipul20_j
 Share

Recommended Posts

hello guyz,,Em a beginner at java and i have installed JDK 1.6 on my laptop.Whenever i compile my program i get an error."javac is not recognized as an internal or external command.."plez help me out!!

Edited by vipul_vj
Link to comment
Share on other sites

PATH is a system wide variable with the paths for finding binaries within the OS etc. Classpath is a variable with paths to classes the java compiler may need to compile your code."javac" is JAVA's compiler and the message means the system can't find it. If your using a JDK alone you will have to edit your systems PATH variable to include the JDK directory. Go here to find out how to configure the PATH variable on windows or alternatively you can execute the compiler from the command line:

cd /D C:\WHEREYOUHAVETHEJDKFILESjavac Helloweb.java

Better to use an IDE with Java though. Netbeans is best but starting off I recommend JCreator or something simpler.

Link to comment
Share on other sites

tnx for your help.I searched out for path and classpath variable.When we compile our program we have saved it in different directotry and java compiler(javac) is in C:/java/jdk/bin.Therefore we receive an error "javac is not recognized as an internal or external command"Remove this error and learn more about path setting @ Path Setting In Java

Edited by vipul_vj
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...