S
Sharp Tool
Hi
I'm trying to execute a Java program from the command line.
I have set the path environment variable to point to the following:
- C:\Program files\Java\jre1.5.0_04\bin
- C:\Documents and Settings\Desktop\Java\Test.class
And PathEXT variable to include:
..CLASS
..class
..JAVA
..java
Now when I start ->run->cmd and type at the command line:
Z:\java Test
I get the error: NoClassDefFound
Note: when I run cmd it defaults to Z:\ drive
Also, switching to:
C:\java Test
Gives the same error.
However, if I change directory to point to:
C:\Documents and Settings\Desktop\Java
and type:
C:\Documents and Settings\Desktop\Java\java Test
It works
I have also tried the classpath from C:\
For example:
C:\java -classpath C:\Documents and Settings\Desktop\Java\Test.class
Gives "and" error
WHAT AM I DOING WRONG?
Cheers
Sharp Tool
I'm trying to execute a Java program from the command line.
I have set the path environment variable to point to the following:
- C:\Program files\Java\jre1.5.0_04\bin
- C:\Documents and Settings\Desktop\Java\Test.class
And PathEXT variable to include:
..CLASS
..class
..JAVA
..java
Now when I start ->run->cmd and type at the command line:
Z:\java Test
I get the error: NoClassDefFound
Note: when I run cmd it defaults to Z:\ drive
Also, switching to:
C:\java Test
Gives the same error.
However, if I change directory to point to:
C:\Documents and Settings\Desktop\Java
and type:
C:\Documents and Settings\Desktop\Java\java Test
It works
I have also tried the classpath from C:\
For example:
C:\java -classpath C:\Documents and Settings\Desktop\Java\Test.class
Gives "and" error
WHAT AM I DOING WRONG?
Cheers
Sharp Tool