|
From: Thomas B. B. <tb...@sy...> - 2001-04-09 07:36:09
|
Please note that you can actually "talk both ways" in a Java/Jython setup. Which way to "talk" is up to you. If you (as you wrote initially) want to program in Python from your java code, the simplest approach in my opinion is to instantiate a PythonInterpreter object in your Jythonized code. If you want to access java from Jython (as you also mentioned), you could write a Jython (Python) script that does that. To get a "feel" for this approach, however, you could also try the interactive Jython interpreter. Try building a simple JFrame, add buttons and dingenots on the fly. It's great fun! To Jythonize your java code from JBuilder you need to install (at least) the jython.jar file to some well-known directory. Then create a "library" in JBuilder that references this .jar file. Include this library in your JBuilder project, and you are set. To access additional .py modules, you will need to add the "lib" directory from the Jython package to your local Jython directory where you installed the jython.jar file. See www.jython.org for additional info on installing Jython from the "self-extracting" .class file and embedding Jython code in Java. Regards /Thomas > -----Original Message----- > From: thp [mailto:th...@hk...] > Sent: 9. april 2001 06:51 > To: jyt...@li... > Subject: [Jython-dev] help > > > Hello! > I am currently learning Java2 with JBuilder 4 foundation! > Now i want to install Jython2.0,so i can program Python > with Java.But how do i install the Jython stuff,so it can talk > to Jbuilder 4? > And how do you install the packages(from the net) into jbuilder4? > > > thanks in advance!! > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-dev > |