I am running jEdit with JythonInterprete and I have a .jar file called JavaTest.jar.
JavaTest has a SampleJavaClass class, which has a printerCount method.
From my .py file I want to make:
from javatest import SampleJavaClass class SampleClass(SampleJavaClass): def pymain(self): SampleJavaClass.printerCount(4)
Java Code:
package javatest; public class SampleJavaClass { public static void printerCount(int i){ for(int j=0; j< i; j++){ System.out.println("hello world"); } } (etc...)
In JythonInterpreter, I already tried clicking "Change Jython path" and add the .jar file, and then run the interpreter again, but it still gives me ImportError: cannot import name SampleJavaClass
Jchao source share