Can't Find Path?

I have two laptops, both running Windows XP and both with Java 1.4. On one laptop the following runs successfully,

START /MIN /WAIT java -classpath . MyProg

This command fails on the other laptop with the message:

The system cannot find the path specified.

However, when I change the command to:

START /MIN /WAIT c:\Sun\AppServer\jdk\bin\java -classpath . MyProg

the second laptop runs fine.

What do you think is happening?

Many thanks.

Cheers,

Howard

[519 byte] By [hjbendera] at [2007-11-26 16:07:34]
# 1
java.exe is not in the PATH of the second machine (the one that fails).
cotton.ma at 2007-7-8 22:29:52 > top of Java-index,Java Essentials,Java Programming...
# 2
I just checked - java.exe is in the path. The same folders/files are on both laptops.Thanks for the reply, but it must be something else.
hjbendera at 2007-7-8 22:29:52 > top of Java-index,Java Essentials,Java Programming...
# 3
I just checked - java.exe is in the path. The same folders/files are on both laptops.Thanks for the reply, but it must be something else.
hjbendera at 2007-7-8 22:29:52 > top of Java-index,Java Essentials,Java Programming...
# 4
post the path from the one that is working and the one that is not.java.exe should not be in your path but c:\program files\java\jdk1.5.0_08\bin\; shouldSean
DataVirtuea at 2007-7-8 22:29:52 > top of Java-index,Java Essentials,Java Programming...
# 5

I'm sorry to have mis-communicated a bit with my original message.

The program MyProg is found by Java and does run in both cases. However, when the local java.exe copy is used, it runs completely on only one laptop. On the other, the java.exe copy must be at the c:\Sun\AppServer\jdk\bin\java location, otherwise the code isn't executed at all.

MyProg sets up a new directory on the C drive and copies files to it. It uses the following:

java.awt

java.io

java.nio

java.nio.charset

javax.swing

I don't understand why MyProg works with the local copy of java.exe on one machine but not on the other. Another person who's playing with MyProg reports the same situation.

Here are the two versions. Java.exe is within the ALC folder:

Working Version:

cd ALC

START /MIN /WAIT c:\Sun\AppServer\jdk\bin\java -classpath . MyProg

cd c:\

cd CopiedFolder

Not Working Version (results in "The system cannot find the path specified" for CopiedFolder):

cd ALC

START /MIN /WAIT java -classpath . MyProg

cd c:\

cd CopiedFolder

Thanx for all your help!

Cheers,

Howard

hjbendera at 2007-7-8 22:29:52 > top of Java-index,Java Essentials,Java Programming...