User Tools

Site Tools


configure_windows_to_run_java_from_the_command_prompt

Configure Windows To Run Java From The Command Prompt


Java can be configured to run .java files from within the command prompt. If Java is installed on your machine, continue to Step 1. Otherwise, install the latest Java JDKTM and return to this page.

Note: This article uses jdk1.7.0_21 as the Java version. Yours may differ.

  1. Locate the JDKTM folder which was created after installing the Java JDKTM software. Double-click the folder to move inside.


  2. Locate the bin folder and double-click it to move inside.


  3. Verify that there is a java executable file within this folder.


  4. Write down or copy the file path to the bin folder.


  5. Open the Advanced System Properties.

    1. Click the Windows Start button located on the bottom left side of the screen.

    2. Right-click the Computer menu option and then left-click on Properties.


    3. On the upper-left menu, left-click on Advanced system settings.


    4. Alternatively, you can easily access this menu in the future by clicking on the Windows Start button, then in the Search box type systempropertiesadvanced. Click on the systempropertiesadvanced program that shows up in the list.


  6. Click the Environment Variables… button.


  7. Under the System variables box, click the Path variable so that the entire row is selected.


  8. Click the Edit… button located under the System variables box.


  9. Click inside the Variable value: text box and press the End key on the keyboard so that the cursor moves to end of the text. Alternatively, click inside the text box and use the right-arrow key until the cursor is at the end of the text.

  10. Type a semicolon ( ; ) and then either paste or type the file path copied from step 4. Be SURE this is done correctly as it can cause your computer to malfunction if done incorrectly!


  11. Click the OK button until the Advanced system properties window closes.


  12. Restart the computer.
configure_windows_to_run_java_from_the_command_prompt.txt · Last modified: 2013/06/04 12:19 by jhuber