How to Set a Java Path

How to Set a Java Path thumbnail
Set a Java Path

Once the Java SDK is installed the path variables must be set so that programs written in Java will be executable from any system directory. The most important programs referenced in the path setting are "java" and "javac," which are essential to appropriate compilation. The path variables are set for convenience purposes as alternatively the path could be specified at the command prompt every time a program is compiled. This article demonstrates how to set the java path variables for Windows Vista.

Things You'll Need

  • Java SDK installed
Show More

Instructions

  1. Setting the Path

    • 1

      Determine what version of Java is installed on your computer. To do this go to the Windows command prompt and type "java -version" and press "Enter." A read out will appear with your version number. It should look something like "jre1.6.0_02" etc. Take note of the version on a piece of paper.

    • 2

      Open the "System" option. To do this go to "Start," "Setting," "Control panel" and "System." Once you have found the "System" icon, double click on it and a window will open with general information about the computer.

    • 3

      Open the environmental variables menu. On the left hand side of the "System" page click on "Advanced System Settings" and press "Continue" when prompted for permission. When the "System Properties" dialog box opens, select the "Advanced" tab and then press the "Environment Variables" button at the bottom right. The "Environmental Variables" dialog box will appear.

    • 4

      Set the path variable. Press the "New" option at the bottom of the window and a "New System Variable" dialog box will appear. In the "Variable Name" area type "path" and in the space for "Variable Value" type "C:\Program Files\Java\your_java_version\bin." Then press OK. Make sure to use the version of Java you wrote down in step 1.

    • 5

      Check that the path variable has been accepted. To check for the path variable go to the "System Variables" menu and select the first variable, but do not double click on it. Use the arrow keys to move down until you find the name "path." Once you have found it press "OK" to exit the dialog box.

Tips & Warnings

  • Similar procedures are used for other versions of Windows as far back as 95.

Related Searches:

References

  • Photo Credit M. Vuskovich

Comments

  • venuxtrap Jun 30, 2010
    :(
  • oquichtli Jun 21, 2010
    Not very helpful.

You May Also Like

  • How to Set the Path for Windows XP Java

    The Java path environment variable is added to Windows, so the operating system can find your Java compiler files. Environment variables in...

  • How to Set the Class Path in Your Computer for Java

    The Java classpath is a string of paths to folders that tell Java where to look for Java libraries it might need...

  • How to Set Up Java Classpath on Windows

    Java developers use the "classpath" to tell Java applications where to find specialized software components, called "classes." The classpath can be set...

  • How to Install Java Path

    Adding the Java path to your Windows platform enables you to call command line functions from the console without navigating to the...

  • How to Update a Java Version in PATH

    Sun's Java Programming Language allows a developer to write an application once and deploy it on any system running the appropriate version...

  • How to Update Java Path Redhat 5

    The computer operating system RedHat Linux 5 allows you to update the path for your Java installation by altering the $PATH variable....

  • How to Add Java_Home to Path under Linux

    The JAVA_HOME environment variable is a required configuration item for many programs and compilers that make use of the Java Development Kit...

  • How to Get Web Root Paths in Java

    Java is a desktop and Web application programming language. The advantage of writing Java applications is that the code is platform-dependent. This...

  • How to Set a Drive Path

    All new hard drive installations are assigned the next available drive letter alphabetically by system default. To change the order of the...

  • How to Set Java Heap Space

    The Java Virtual Machine (JVM) is the execution component of the Java Runtime Environment (JRE) that interprets and executes the byte code...

Related Ads

Featured