jQuery in Action, 3rd edition
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

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cannot compile java applications" Watch "Cannot compile java applications" New topic

Cannot compile java applications

Subir Chetia

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
Cindy Glass
"The Hood"

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

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
It's not a secret anymore!