How to configure java in environment variables

Asked By 1800 points N/A Posted on -
qa-featured

Hi,

I set it to JAVA_HOME under System Variables and the path to C:Program FilesJavajre6

I am having an issue setting the JAVA_HOME Environment Variable within Windows XP.

Yet it doesn't seem to have detected.

Would be great if someone helps.

Thanks.

SHARE
Best Answer by Schneider Matthew
Answered By 0 points N/A #125851

How to configure java in environment variables

qa-featured

Hi Abhinav,

To configure java in the Environment variables, this is the procedure.

Right click  on ' My Computer'  and Select  ' Properties '

Click on the ' Advanced ' tab

At the near bottom of the window, click on 'Environment Variables ' : a pop up window will appear

At the Upper part ; under ' User variables '  : click  ' New '

Type : 'JAVA_HOME' as the ' Variable name '   and for the 'Variable value' ; This should point to the folder you have installed your JDK : Example : C:Program Filesjavajdk1.6      CLICK OK

Now under the Systems variables, set the path to the bin directory inside the directory where your JDK is installed

Example:           ;C:Program Filesjavajdk1.6bin          Note the semi colons at the start of the line, this has to be there

to separate the paths.

Best Regards

Mose

Best Answer
Best Answer
Answered By 0 points N/A #195615

How to configure java in environment variables

qa-featured

Hi Abhinav,

After installing JDK and JRE, you need to add the path of JDK and JRE to Environment Variables in order to run Java from anywhere in your system.

Please find the step by step instruction to set the path of JDK and JRE in Windows based systems.

Windows 7

Right click Computer from the Start menu and select properties

On the left panel, select Advanced System Settings

Select Advanced Tab

Click on Environment Variables


Under User variables, create 2 variables

1.JRE_HOME and give the path of JRE installation as its value(eg:- C:Program FilesJavajre6bin;)

2.JAVA_HOME and give the path of JDK installation as its value(eg:- C:Program FilesJavajdk1.6.0_21bin;)

Under System Variables, find the variable ""path"" and edit it.

Insert the path of your JDK and JRE installation separated by semi colon(;) and click OK(eg:- C:Program FilesJavajdk1.6.0_21bin;C:Program FilesJavajre6bin;)

Windows XP

Start -> Control Panel -> System -> Advanced

Click on Environment Variables

Under User variables, create 2 variables

1.JRE_HOME and give the path of JRE installation as its value(eg:- C:Program FilesJavajre6bin;)

2.JAVA_HOME and give the path of JDK installation as its value(eg:- C:Program FilesJavajdk1.6.0_21bin;)

Under System Variables, find the variable ""path"" and edit it.

Insert the path of your JDK and JRE installation separated by semi colon(;) and click OK(eg:- C:Program FilesJavajdk1.6.0_21bin;C:Program FilesJavajre6bin;)

Now you can run any .java file located anywhere in your system

Hope it helps."

Related Questions