PDA

View Full Version : Question on Programming with Java



LionHart
07-18-2005, 11:03 PM
One small question. I seem to be having technical difficulties when trying to compile my java program. The course study book I am using says to use the comman "javac (file name)" to compile my .java file. However when I type in the said command, windows command prompt replies "error: cannot read file". I do not know what is wrong. I have the paths defined, as far as I know and the file extensions are correct. I just don't understand why it will not read the file. I'm using Notepad to input the code and Windows Command Prompt to execute the J2SE SDK v1.4.2 javac program. I thought I might be missing a few java files, but I am not sure. There is no troubleshooting section of this book. I don't know how much help I will receive here, but any I would appreciate. Thanks.

~LionHart~

Samuraid
07-19-2005, 12:56 AM
Try explicitly specifying all input paths. Like...

c:\whatever\java\path\javac c:\whatever\program\path\YourProgram.java

LionHart
07-19-2005, 02:11 AM
Nope :( . It didn't work. Thanks for your help though.

Samuraid
07-19-2005, 04:15 AM
Can you attach a copy of the java file you are trying to compile with javac?

LionHart
07-23-2005, 02:35 AM
I figured it out. Truth is, I don't know anything about this stuff yet and I wasn't even in the right directory. Defining the paths would have fixed the problem, however, I didn't know how to do that right. It's all good now. I'm advancing...sort of. Thanks for your help. :cool:

Samuraid
07-23-2005, 07:07 PM
Glad you got it figured out. :D