Environment variables for java installation

后端 未结 14 1106
清歌不尽
清歌不尽 2020-11-22 00:52

How to set the environment variables for Java in Windows (the classpath)?

14条回答
  •  粉色の甜心
    2020-11-22 00:58

    In Windows inorder to set

    Step 1 : Right Click on MyComputer and click on properties .

    Step 2 : Click on Advanced tab

    alt text

    Step 3: Click on Environment Variables

    alt text

    Step 4: Create a new class path for JAVA_HOME

    alt text

    Step 5: Enter the Variable name as JAVA_HOME and the value to your jdk bin path ie c:\Programfiles\Java\jdk-1.6\bin and

    NOTE Make sure u start with .; in the Value so that it doesn't corrupt the other environment variables which is already set.

    alt text

    Step 6 : Follow the Above step and edit the Path in System Variables add the following ;c:\Programfiles\Java\jdk-1.6\bin in the value column.

    Step 7 :Your are done setting up your environment variables for your Java , In order to test it go to command prompt and type

     java   
    

    who will get a list of help doc

    In order make sure whether compiler is setup Type in cmd

      javac
    

    who will get a list related to javac

    Hope this Helps !

提交回复
热议问题