How to Set PATH from JAVA_HOME

  • google plus

In Brief...

The JAVA_HOME environment variable can be used to set the PATH so that the compiler and runtime launcher can be accessed from a command prompt. To set the PATH variable using JAVA_HOME, follow these five steps.

Take our Introduction to Java Training course for free.

See the Course Outline and Register

Instructions

  1. Go to the Environment Variables panel. You can locate this panel in the Control Panel by selecting System and Security > System > Advanced system settings > Environment Variables.
    Control Panel To Environment Variables

  2. Under System variables, select Path and then click Edit.
    Edit Button

  3. Click New. In the text box, type %JAVA_HOME%\bin. Click OK.
    New Path Entry

  4. Click OK on the Environment Variables panel.
    Environment Variables Panel

  5. Open a new command prompt to test your new PATH entry.
    Test New Path Entry

Author: Stephen Withrow

Stephen has over 30 years' experience in training, development, and consulting in a variety of technology areas including Java, C, C++, XML, JavaScript, AJAX, Tomcat, JBoss, Oracle, and DB2. His background includes design and implementation of business solutions on client/server, Web, and enterprise platforms. Stephen is a published writer in both technical and non-technical endeavors. Stephen received an undergraduate degree in Computer Science and Physics from Florida State University.

Discuss