This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot compile java applications  RSS feed

 
Subir Chetia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Subir Chetia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks mate. My problem is solved - I had saved the files as .java.txt files by mistake.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!