I'm having a problem/s getting started. When I type in (under MS-DOS at the prompt: C:\WINDOWS>) "javac HelloWorld.java" OR "javac TicTacToe.java", I get an error message stating "error: Cannot read: HelloWorld.java" or "error: Cannot read: TicTacToe.java" I've read the forum where others have had similar problem, but . . . I set at the end of my PATH: ;C:\JDK1.3\BIN;C:\JDK1.3\JRE\BIN I set my CLASSPATH: set CLASSPATH=C:\JDK1.3\LIB;.;C:\JAVA (after making a directory called "java" and storing the HelloWorld.java file in it). I have VisualCafe installed also. Could that be causing a problem? Please help.
Does your case match up right? In other words, Java is far more case sensitive than other languages. Even C. I know that I make sure that my classpath stuff all has the right case. And anything I type on the command line has to have the right case too.
Well, Paul, I went back and made sure ALL cases were matched. No go -- now it tells me "Bad command or file name" when I try to compile HelloWorld.java or TicTacToe.java. This is the third evening I worked on this. I'm ready to try using VisualCafe. Anymore suggestions? I've went thru what was said to do in the Cattledrive and the Readme.html file (installation instructions). Thanks.
Angela Poynton
Ranch Hand
Joined: Mar 02, 2000
Posts: 3143
posted
0
Do you have the JDK jar files in you classpath. I don't know about JDK3 but JDK2 you need rt.jar and tools.jar in your classpath!
Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
AJ Dussault
Ranch Hand
Joined: May 17, 2000
Posts: 53
posted
0
Hmmm, you are sitting in the c:>windows directory and trying to compile a java file that is sitting in the c:>java directory??? Am I reading your post correctly?? It seems that your path is fine (type in javac at the command prompt and you should see some 'help' text) if that is what you see, move to your java directory and try compiling form there. Hope that helps :-)
If you see "bad command or file name" - that means that your path is not set to point at the java compiler. My path includes c:\jdk1.2.2\bin which is where my java and javac stuff is. Then, my classpath points to c:\java which is where I put my .java files that I'm working on. While I am currently in that directory, I'll try javac MyProgram.java