Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java file does not get compiled

Status
Not open for further replies.

786snow

Programmer
Nov 12, 2006
75
I have a java source file at c:\my_java

I do the following to complile it at the DOS prompt but it does not work, what have I done wrong here?


C:\Program Files\Java\jdk1.5.0_08\bin\javac c:\my_java\simpleprogram.java

I do not get any error, and I thought it got compiled, but when I go the folder where source file is , it does not generate the class file there............

--------------------------------------------------------------------------------

 
I've followed your instructions and I get the file .class file generated in the same dir as the source without problems... I normally use and IDE, that's why I had to try it. Are you sure the .class file is not generated and you don't get any error?
 
Even though DOS or Windows does not differentiate between upper and lower case file names, javac does. The file name that you supplied is a parameter to the compiler, and the case is sensitive for the file name (and probably for the path as well).
Display the file name and the path, and try again using the correct case. Hope you'll get it.
 
thanks a lot, it works now, I was not having class name same as filename
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top