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.
Executables are in the bin subdirectory of your installation directory (you'll probably use javac and java to compile and run Java programs, respectively).
Since you're using Windows (I guess by the path), you need to set Environment Variables properly so you can use these tools from command line. Google will probably give you detailed tutorials on how to set them up.
The quieter you are, the more you are able to hear.
Joined: Jul 31, 2002
No executable files in my c:\program files\java\jdk1.7.0-0.9\bin folder. only application files.
Kemal Sokolovic wrote:
Since you're using Windows (I guess by the path), you need to set Environment Variables properly so you can use these tools from command line.
You can write wrapping scripts (both under Windows and Unix including Linux) for the command line tools, so there is no absolute necessity to set environment variables.
I write wrapping scripts like javaw14, javac15, java16, javap17 etc. for the different versions and I put them onto the PATH.
I consider this an appropriate way for the command-line coexistence of different Java versions.
You were said not to put your project files (classes or source files) in a bin folder.
To set up environment variable do the following:
Go to Start->Control Panel->System, to display system properties.
On the left side, click on Advanced System Settings. When done, you should be prompted by System Properties dialog.
Now click Environment Variables button to open Environment Variables dialog.
Scroll down inside the System variables box and select the Path variable. Click the Edit button. This will cause the Edit System Variable dialog to appear.
Place the cursor inside the Variable value field. Move the cursor to the end of the field and add ; after the last item in the field. Then type/paste the name of the directory in which you placed the JDK followed by \bin; (eg. C:\Program Files\Java\jdk1.7.0_07\bin;). DO NOT PLACE ANY SPACES BEFORE OF AFTER WHAT YOU TYPE (not shouting, just pointing this part)! Click OK button to apply changes you made to environment variable.
If you already have a Command Prompt running, you need to restart it. When opened again, type in Command Prompt and you should get something like this:
If you get something like this as output then you've set it right and you can use it to compile/run java programs from command line.