This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I cannot compile a java program. I have all the latest versions of jdk 1.3,jdk 1.2, jsdk, MSVM, installed on my pc. Even when I type "Dir:\jdk1.3\bin\javac filename.java" the program does not get compiled.
Originally posted by Subir Chetia: I cannot compile a java program. I have all the latest versions of jdk 1.3,jdk 1.2, jsdk, MSVM, installed on my pc. Even when I type "Dir:\jdk1.3\bin\javac filename.java" the program does not get compiled.
Hi, Although this is a minor error, still please check that you have location of JAVAC.EXE and JAVA.EXE in your PATH variable. Also, the CLASSPATH variable is properly set, and ensure you are using the command "javac filename.java" to compile.
I seriously doubt if you put the filename.java in the bin directory with the downloaded stuff. As stated above the PATH variable tell the operating system where to search for the downloaded stuff that has javac in it, and where to find the .java files. So it needs to include the \bin directory and the directory where you are keeping the source. The CLASSPATH tells the operating system where to look to find the compiled classes to execute. So it needs to include the \bin directory and the directory where you are keeping the .class files (I keep them in the same directory with my .java files for simplicity at home, but at work we keep them separate).
"JavaRanch, where the deer and the Certified play" - David O'Meara
hello u can set ur path in autoexec.bat file as dir:\jdk1.3;dir:\jdk1.3\bin; This will help u and u need not to bother about path each and every time u will compile ur program.to compile it just use command "javac filename.java".also be sure that u are in the same directory where ur .java file is placed on command prompt. Smriti Singla