From: =?utf-8?Q?<mdu...@vo...> - 2002-12-06 21:58:19
|
I discovered jython and it's cool but I encountered some problems may be you could help: --------------------------------------------------------------------------- Do I have to set some environment vars or something in some particular files to be able to compile the given examples (applets & bean). I have the following error: Compiling .java to .class... Compiling with args: ['D:\\j2sdk1.4.1_01', '+E', '+D', '-g', '-classpath', 'D:\\j2sdk1.4.1_01\\jre\\lib\\rt.jar:D:\\Programming\\Jython-21 \\dist:.;D:\\Programming\\Jython-21\\jython.jar;;.\\jpywork;;D:\\Programming\\Jython-21\\Tools\\jythonc;D:\\Programming\\Jython-21 \\Demo\\applet\\.;D:\\Programming\\Jython-21\\Lib; D:\\Programming\\python22;D:\\Programming\\Jython-21', '.\\jpywork\\HelloApplet.java', '.\\jpywork\\Converter.java', '.\\jpywork\\ListDemo.java', '.\\jpywork\\pawt\\__init__.java', '.\\jpywork\\HelloWorld.java', '.\\jpywork\\ButtonDemo.java', '.\\jpywork\\LabelDemo.java', '.\\jpywork\\CheckboxDemo.java', '.\\jpywork\\ChoiceDemo.java', '.\\jpywork\\CoordinatesDemo.java', '.\\jpywork\\ButtonFontDemo.java'] 1 java.io.IOException: CreateProcess: D:\j2sdk1.4.1_01 +E +D -g -classpath D:\j2sdk1.4.1_01 \jre\lib\rt.jar:D:\Programming\Jython-21\dist:.;D:\Programming\Jython-21\jython.jar;;.\jpywork;;D:\Programming\Jython-21 \Tools\jythonc;D:\Programming\Jython-21\Demo\applet\.;D:\Programming\Jython-21\Lib;D:\Programming\python22; D:\Programming\Jython- 21 .\jpywork\HelloApplet.java .\jpywork\Converter.java .\jpywork\ListDemo.java .\jpywork\pawt\__init__.java .\jpywork\HelloWorld.ja va .\jpywork\ButtonDemo.java .\jpywork\LabelDemo.java .\jpywork\CheckboxDemo.java .\jpywork\ChoiceDemo.java .\jpywork\Coo rdinatesDemo.java .\jpywork\ButtonFontDemo. java error=3D5 Consider using the -C/--compiler command line switch, or setting the property python.jythonc.compiler in the registry. ERROR DURING JAVA COMPILATION... EXITING --------------------------------------------------------------------------- I tried to embed some java JNI source code. I could load the dll file, but I don't know how to manage to access the methods in the dll file. in java it is: public class DisplayMessage{ static { System.loadLibrary("DisplayMessage"); } public static void main(String[] args){ System.out.println(printMessage("hello")); } public static native String printMessage(String s); } in my jython script, i tried: from java.util import Lang System.loadLibrary("DisplayMessage") print(printMessage("hello")) but it didn't work how can I do? ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr |