July 12, 2012

Setting path for Java in command prompt of Win7

Problem: Typing javac in command line produce error "'JAVAC' is not recognized as an internal or external command, operable program or batch file"

To verify java version from windows you need to type javac -version in command prompt - but first set path as explained at:
 http://www.java.com/en/download/help/path.xml

System Properties  - Advanced system settings > Advanced tab - Environment Variables, under System Variables, find PATH
adding the location (where JDK was installed).

There should be no space between other text already in path, path should look like this;
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files\Java\jdk1.7.0_02\bin


No comments: