Pergunta

I have the classic :

java.lang.NoClassDefFoundError: org/python/util/jython

Even if the jar jython.jar exist in the environment variable PATH for my user and system wide path.

How can I quickly test that I am not crazy and it is indeed in the path?

Foi útil?

Solução

Java doesn't use the PATH variable.

To specify the classpath when running a java application use the -cp parameter for the java command.

Inside your batch file (the .cmd file) find the java command and add the needed jar file:

java -cp somefile.jar;\path\to\jython.jar someclass.MainMethod

Please don't use the deprecated CLASSPATH any more.

For more details, please see the Java documentation:
http://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html#tooloption

Outras dicas

use the following command

set classpath="path to your jar/jython.jar";
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top