Wednesday, July 09, 2008

How to set PATH and CLASSPATH for Java in Vista*

Wednesday, July 09, 2008 7:10:42 AM (GMT Standard Time, UTC+00:00)

How to set PATH and CLASSPATH system variables for Java in Windows Vista..

Control panel (Classic View)
System
Click on "Advanced system settings"
Environmental Variables
System Variables
Select the PATH
Click Edit
Add your path to the PATH variable.... normally .. C:\Program Files\Java\jdk1.6.0_(version)\bin

This tip is thanks to 'sha-k' at http://www.computing.net/answers/progra ... 15739.html

Regarding the CLASSPATH, it's also important to ensure the the CLASSPATH includes "." i.e. the current directory, preferably this is the first entry as well. This ensures Java checks your current directory first when looking to execute the class file with the "java" command (when using for e.g. Command Prompt).

Related posts:
Learning LaTeX and Eclipse
Including jar files in your projects in Eclipse
How to set CLASSPATH (and PATH) for Java in Linux
Running Java classes with packages in Command Prompt

Comments are closed.