How to import java class used Jython in Python?
datulaida ali
datulaida.ali at gmail.com
Mon Jul 16 03:20:13 EDT 2007
Hi all...
How to import Semantic class used Jython in Python?
here my java code..
JAVA CODE
----------------
import java.text.BreakIterator ;
class Semantic {
// native C++ method
//public native void printMessage( String message );
public native String printMessage( String message );
// load library JNIPrintMessage into JVM
static {
System.loadLibrary( "JNIPrintMessage" );
}
public static void main(String [] args) {
String l = "i go to school";
pilih_ayat(l);
}
public static String pilih_ayat(String n){
JNIPrintWrapper wrapper = new JNIPrintWrapper();
String ayat_siap = wrapper.printMessage(n);
System.out.println("output >>" + ayat_siap);
return n;
}//end pilih ayat
public Semantic(){
System.out.println ("Berjaya");
}
}//end class
JAVA OUTPUT
--------------------
output >> (S(NLP i) (VP go(PP to(NLP school))))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070716/eab3eed2/attachment.html>
More information about the Python-list
mailing list