Path to Java\jdk1.6.0_02\bin goes away

I keep all of my java files in one directory.

I use the following batch file to make jar files.

When I change the path either with this batch file or

manually on the command line, the path reverts to the

old path for any other command-line window.

REM 1st arg is prog name,

REM 2nd arg is dummy x (or p to augmentfor javac,jar,java.exe)

if %2==p set PATH=%PATH%;C:\"Program Files"\Java\jdk1.6.0_02\bin

path

dir %1*.*

erase *.class

erase %1.jar

dir %1*.*

javac %1.java

jar cvfe %1.jar %1 *.class

dir %1*.*

erase *.class

dir %1*.*

java -jar %1.jar

REM the previous (last) command checks that the program

REM runs without parameters, usually giving instructions

How do I make a more lasting change to the path?

I use Windows Vista.

[1062 byte] By [hillmia] at [2007-11-27 11:48:50]
# 1

> How do I make a more lasting change to the path?

This is not really a Java-related question. Setting environment variables (PATH is one of them of course) is an operating system-specific thing.

I haven't installed Windows Vista (yet) but imagine it's comparable to XP. If so, right-click the "My Computer" icon on your desktop and click "Properties". Find somewhere on the dialog box where it lets you set environment variables.

warnerjaa at 2007-7-29 18:21:37 > top of Java-index,Java Essentials,New To Java...
# 2

Ya! Thanks! Resembles your description for XP.

Now I'll just get rid of setting it in the batch file.

It's Java related because the installer didn't do it.

JET does. Maybe I'll remember now.

hillmia at 2007-7-29 18:21:37 > top of Java-index,Java Essentials,New To Java...