This content has been marked as final. Show 4 replies
Instead of cpoying all that stuff, you should have pondered for a minute what the classpath actually is. So you wold have seen that you need to include the location of your classes.
or even an executable JAR, and leave the variable alone.
java -cp . mypackage.Myclass
Executable jar worked even if the command "java test" didn't.
-cp worked cheers.
So is it possible to make it search for its class file automatically? I must have a misconfiguration somewhere...
You can add a "." to your classpath and the jvm will always look in the current directory for your classes
Adding the classpath=.;...etc didn't make a difference for me.
or even an executable JAR, and leave the variable alone.Good advice... I cleared my classpath all together in command prompt:
And everything worked again. eg "> java test" works now.