*
The moose likes Beginning Java and the fly likes Cannot compile java applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cannot compile java applications" Watch "Cannot compile java applications" New topic
Author

Cannot compile java applications

Subir Chetia
Greenhorn

Joined: Jan 26, 2001
Posts: 10
I had installed jsdk 2. But when I try to compile a java file it says cannot read the specified file. I had also given the required parameters in the autoexec file sitll the problem is persisiting. Please help.
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
I can't think of anything except making sure to set path and classpath. Run in dir where your source code is, or add it to path.
see http://www.javaranch.com/ubb/Forum19/HTML/000505.html
HTH
Dan
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
A common mistake is to use wordpad or something and then forget to save the file as .txt. The java compiler can not read a file saved as a word document even if it is named .java.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Subir Chetia
Greenhorn

Joined: Jan 26, 2001
Posts: 10
Thanks mate. My problem is solved - I had saved the files as .java.txt files by mistake.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot compile java applications
 
Similar Threads
Error running javac.exe compiler
PATH variable doubt.
JRE Question
accessing web service through a jsp/html
Referencing classes in other files.