- Click the
Startbutton in the lower left of the screen. - Select
Control Panelfrom the pop-up menu. - Choose
Systemfrom the submenu.(Click Advanced system settings on left in Vista and Windows 7) - Click the
Advancedtab. - Click the
Environment Variablesbutton near the bottom and you will see two lists of variables. - Look in the
System variableslist for a variable namedCLASSPATH. If you find it, clickEdit. If you don't find it, clickNewand enterCLASSPATHin theVariable namefield. - The
Variable valuefield is a list of file paths of directories orjarfiles. The first thing in this list should be the current directory, which is represented in windows just as it is in Unix, as a single period. If there's more than one thing in this list, separate items with a semicolon. For example, my CLASSPATH variable starts with these three items (there are a couple more, but this should be enough to give you the idea). The only part you need is the first "dot"..;C:\classpath\com.fredswartz.ezgui.jar;c:\classpath\TableLayout.jar;
I put extra libraries that I want to be searched in a directory namedclasspath, but you can choose any name. - Now just add the following depending on your environment installed on computer. eg.:
D:\Program Files\Java\jdk1.6.0_24\bin
Saturday, 23 April 2011
Setting path and classpath for java in windows XP, Vista and Windows 7
Labels:
classpath,
java,
windows os
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment