This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am trying to run a simple program but cannot run the compiler. I am running on Vista, and I set the path in the Environment Variables, by copying and pasting the location of my bin folder. I checked the path from the command prompt and it looks correct:
I wrote a simple program in word pad and when i tried to execute it still got the following error message
javac is not recognized as an internal or external command,
operable program or batch file.
Where is your .java file, and what directory are you running the command from? By default, it looks for the file in the directory you are running the javac command from. in other words, cd into the directory where your .java file is and try again.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Just remember that Windows uses the 8.3 naming rules in the dos prompt
Translated into english this means that
would be represented more like this
How do I know what the dos name for each file is
Simple at the C:> prompt I type
C:> dir /x
It will then list this file amongst the others Progra~1
Then I type
C:> cd Progra~1
C:\Progra~1> dir /x
JavaFXjavafx-sdk1.2 JavaFX~1.2 Folder
Since I know that the bin direcrory only has 3 letters in it's name I type
C:\Progra~1\JavaFX~1.2> cd bin
and then I am in