File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiling problems

 
Alan Dooley
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
paul wheaton
Trailboss
Pie
Posts: 21187
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Alan Dooley
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
AJ Dussault
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :-)
 
paul wheaton
Trailboss
Pie
Posts: 21187
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic