/ Sign-up
Your question

[JAVA HELP] Help with javac

  • Programming
  • Java
  • Command Prompt
  • Apps
Last response: in Apps General Discussion
April 28, 2012 5:22:53 AM

Im an absolute beginner to Java and im learning from
Beginning Java by Ivor Horton

I installed JDK 7 and did change the path variable to point to the bin directory in the root folder.
however when i issue this command from cmd, I get this error
Command: javac
Error: file not found.

Now this is not posible cause I have checked that the file is there.
The same thing seems to work fine with Jcreator LE.

So my two questions are:
1. How do I resolve this javac error?
2. If I want to save all my source codes to another directory (lets assume a directory named SourceCode on Desktop) then what changes have to be made???

ps: Im an absolute noob.

More about : java help javac

April 28, 2012 5:25:40 AM

Path : C:\Program Files\Java\jdk1.7.0_04\bin\

Best solution

a b L Programming
April 29, 2012 4:09:27 AM

Are you issuing that command from the directory where is? If you don't specify a path but just a filename, Windows looks for it in the current working directory. Remember that you'll have to use the cd command to navigate to the directory with the file before running it, or specify the absolute or relative path to the file from the default working directory (which is C:\Users\%USERNAME%).
Related resources
Can't find your answer ? Ask !
May 6, 2012 1:28:24 PM

Best answer selected by fasihxkhatib.
May 6, 2012 1:31:57 PM

This topic has been closed by Area51reopened