Hi everyone,
As I have a quite big python library and want to use its function inside a java application I was interested to use jythonc to compile it as java class, but I didn't succeed at all :((
 
 I tried the following as a first step:
 
---------------rectangle.py------------------------------------
import java.lang
class Rectangle(java.lang.Object):
    """
        Petite classe rectangle
    """
    def __init__(self):
        "@sig public rectangle()"
        self.longueur=0.
        self.largeur=0
    def setlong(self,a):
        "@sig public void setlong(java.lang.Integer a)"
        self.longueur=a
    def setlarg(self,a):
        "@sig public void setlarg(java.lang.Integer a)"
        self.largeur=a
    def aire(self):
        "@sig public java.lang.Integer setlong()"
        return self.longueur*self.largeur
------------------------------------------------------------------
-------------demo.java--------------------------------------
public class demo {
    public static void main(String[] args) {
    rectangle ar = new rectangle();
    ar.setlong(12);
    ar.setlarg(10);
    java.lang.Integer surf=ar.aire();
        System.out.println ("Surface = " + surf);
    }
}
------------------------------------------------------------------
 
$ jythonc  rectangle.py
processing rectangle
 
Required packages:
  java.lang
 
Creating adapters:
 
Creating .java files:
  rectangle module
    Rectangle extends java.lang.Object
 
Compiling .java to .class...
Compiling with args: ['/usr/local/j2sdk1.4.0_01/bin/javac', '-classpath', ':/usr/share/java/jython.jar:/home/jmh/skillf/skinlf-1.2.3/lib/skinlf.jar:/home/jmh/skillf/skinlf-1.2.3/lib/nativeskin.jar:./matrix.jar:./ihm.jar:/usr/share/java/libreadline-java.jar:./jpywork::/usr/share/jython/Tools/jythonc:/projets/sdt/source/tminer/src/.:/usr/share/jython/Lib:/usr/local/python/lib/python2.1', './jpywork/rectangle.java']
0  Note: ./jpywork/rectangle.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
 
 
it created a rectangle.class as expected :-)))
 
 
$javac demo.java
demo.java:5: cannot resolve symbol
symbol  : method setlong  (int)
location: class rectangle
    ar.setlong(12);
      ^
demo.java:6: cannot resolve symbol
symbol  : method setlarg  (int)
location: class rectangle
    ar.setlarg(10);
      ^
demo.java:7: cannot resolve symbol
symbol  : method aire  ()
location: class rectangle
    java.lang.Integer surf=ar.aire();
                             ^
3 errors
 
Well, I understand that jythonc didn't build the interface of my rectangle class but  I don't understand why. Any help would be appreciated, thanks.