Not able to properly set up the path of java in Windows 7 , 64 bit

NewCodeLearner picture NewCodeLearner · Feb 6, 2012 · Viewed 11k times · Source

I have installed java 1.6 in my computer and I have also set the path, using the advanced variable settings.

At a command prompt when I tried to execute java I got this error:

 Error: could not open `C:\Program Files\Java\jre7\lib\amd64\jvm.cfg'

But when I executed this command from a command prompt: javac -version it was showing that I had the proper version set.

 javac 1.6.0_27.

Someone please help me to solve this error.

Answer

Manav Brar picture Manav Brar · Feb 27, 2012

Windows 7

  1. Go to the control panel, "Control Panel\All Control Panel Items"
  2. Then find java icon, click on it.
  3. Select option "Java" right next to the "General" tab.
  4. There is only one button in this box "View", click on this.
  5. Look up your corresponding JRE vesion and make sure it is pointing to the correct version, under path.
  6. If your JRE is not visible click ADD.