|
From: Robert W. B. <rb...@di...> - 2001-10-24 22:18:30
|
On Wed, 24 Oct 2001, Ming-Lun Tung wrote: > Help! > > I have successfully compiled my "hello world" python script into a java class > > The python code goes like this: > > print 'Hello World!' > > I figured that it will compile through jythonc, and it did, outputting a hello.class file. You should also have a hello$_PyInner.class. Both are required to run. > Then I typed "java hello" and I got a > "Exception in thread "main" java.lang.NullPointerException" > > My command line for java is "java -classpath .;c:\jython-2.1a3 hello.class" Make sure that the jython.jar file is in the classpath, and don't use the ".class" extension when invoking the class with java. e.g.: "java -classpath .;c:\jython-2.1a3\jython.jar hello" > Am I doing something wrong? See command-line tweak above. > I thought it will just output "hello world" from the prompt. It will. -robert |