jython and java application

KB keith at nekotaku.com
Wed Nov 25 21:49:15 EST 2009


Hmmm, for some reason my follow up post didn't make it.

Modified jython script to:

# Eclipse package name for java application
import krbtest

import java.lang as lang
from java.lang import String
from jarray import array

myargs=array([],String)

krbtest.SimpleHistoricTutorial().main(myargs)
****

Now I get:

Traceback (most recent call last):
  File "test.py", line 15, in <module>
    krbtest.SimpleHistoricTutorial().main(myargs)
	at krbtest.SimpleHistoricTutorial.run(SimpleHistoricTutorial.java:27)

	at krbtest.SimpleHistoricTutorial.main(SimpleHistoricTutorial.java:
22)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.lang.reflect.Method.invoke(Unknown Source)


java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: com/
bloomberglp/blpapi/Session


I would post the java app but its quite large, but the main defn:

	public static void main(String[] args) throws Exception
	{
		SimpleHistoricTutorial example = new SimpleHistoricTutorial();
		example.run();
	}


Is pretty vanilla. I have tried making the run() a public method and
call it, all to no avail.

Note, the Java app works fine standalone, I just need to call it from
jython.

Again, any help appreciated.



More information about the Python-list mailing list