Jump to content
Sign in to follow this  
vipul20_j

what is path and classpath in java

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...