C:\Documents and Settings\shr3dd3r\My Documents\javastuff>set path=%path%;C:\j2sdk1.4.2\bin; C:\Documents and Settings\shr3dd3r\My Documents\javastuff>set classpath=%classpath%;.;
How do I set paths permanently? Is it even possible??
Anurag Mishra
Ranch Hand
Joined: Jun 16, 2003
Posts: 121
posted
0
Hi, u can set paths permanently by this way 1. if ur using windows go to Desktop-- MyComputer Right Click-->u will get a window called System Propertiesthere under Advanced TAB select EnvironmentVariables select new and create new variable as path n give ur path. thanks
SCJP 1.2
Carlos Montes
Greenhorn
Joined: Aug 02, 2003
Posts: 7
posted
0
Originally posted by Anurag_M: Hi, u can set paths permanently by this way 1. if ur using windows go to Desktop-- MyComputer Right Click-->u will get a window called System Propertiesthere under Advanced TAB select EnvironmentVariables select new and create new variable as path n give ur path. thanks
In the Environment Variables Box There is two boxes within it One of them say User variables for shr3dd3r and you can add a new one, edit or delete. Then there is a small box right underneath that says System Variables and you can also add a new variable, edit or delete. Which one of these do I add the new variable to? and do I include the entire thing? such as C:\Documents and Settings\shr3dd3r\My Documents\javastuff>set path=%path%;C:\j2sdk1.4.2\bin; Or just the set path=%path%;C:\j2sdk1.4.2\bin; Im lost here, thank you for any help
Karthikeyan Rajendraprasad
Ranch Hand
Joined: Apr 16, 2003
Posts: 70
posted
0
there are two option 1. set it in the system 2. create a batch file and run it whenever necessary set it in the system windows 95/98 add the two lines in the autoexec.bat set it in the system windows NT/2000 right click my computer select properties in that select advanced tab and in that environment variables you have two options here. add for current user or all users[system] select new and add the two lines one by one
create a batch file and run it whenever necessary open Notepad paste those lines and save it as a batch file say paths.bat run this batch file when ever you go to command prompt instead of typing those two lines.
Karthikeyan<br />SCJP 1.4, SCWCD.
Carlos Montes
Greenhorn
Joined: Aug 02, 2003
Posts: 7
posted
0
Originally posted by Karthikeyan Rajendraprasad:
windows NT/2000 right click my computer select properties in that select advanced tab and in that environment variables you have two options here. add for current user or all users[system] select new and add the two lines one by one
Yes but Which lines do i include? This one? C:\Documents and Settings\shr3dd3r\My Documents\javastuff>set path=%path%;C:\j2sdk1.4.2\bin; or just this set path=%path%;C:\j2sdk1.4.2\bin;
leo donahue
Ranch Hand
Joined: Apr 17, 2003
Posts: 327
posted
0
Originally posted by Carlos Montes:
Yes but Which lines do i include? This one? C:\Documents and Settings\shr3dd3r\My Documents\javastuff>set path=%path%;C:\j2sdk1.4.2\bin; or just this set path=%path%;C:\j2sdk1.4.2\bin;
Hi Carlos, I have the jdk installed under Win 2000. Try these steps: 1. Right click on the My Computer icon on your desktop 2. Select properties 3. Click the Advanced tab 4. Click the Environment Variables button 5. You should see a User variables window and a System variables window 6. Under the System variables window, do you have a variable named CLASSPATH ?? 7. If not, then click the new button under the System variables window, If you do then make sure it has the stuff in steps 8 and 9 8. Under variable name, type this: CLASSPATH 9. Under the variable value, type the full path to the folder in which you will be saving all of your java work, which you've said is: C:\Documents and Settings\shr3dd3r\My Documents\javastuff As I understand it, having a classpath set allows you to import classes that you've already created and want to use in other programs. But I personally think you also need to amend your path variable and add the full path to folder in which your java and javac exe's are located, which in your case is C:\j2sdk1.4.2\bin Just add C:\j2sdk1.4.2\bin; either to the front of your path variable OR ;C:\j2sdk1.4.2\bin to the end of it. Notice the semicolon placement of either option. [ August 07, 2003: Message edited by: leo donahue ]
Thanks, leo
Karthikeyan Rajendraprasad
Ranch Hand
Joined: Apr 16, 2003
Posts: 70
posted
0
oops i missed that im post when you click new it will have 2 text boxes 1. variable name 2. variable value in name enter path in value enter %path%;C:\j2sdk1.4.2\bin; same way for classpath in name enter classpath in value enter %classpath%;.;
arun mahajan
Ranch Hand
Joined: Dec 07, 2001
Posts: 304
posted
0
Hello, Is it possible to set this classpath programatically too!! Arun