Importing java within python

Henry Chang goldspin at gmail.com
Thu Jan 17 11:36:59 EST 2008


www.jython.org

On Jan 17, 2008 8:06 AM, Osthaus, Christopher (Mission Systems)
<Christopher.Osthaus at ngc.com> wrote:
>
>
> Hi All,
>
> This is an easy one - I'm new to Python and working on a script where I need
> to use some java swing classes.  I'm running Python on Windows.
>
> I've got an import statement that looks something like:
>
> from java.lang import System
> from javax.swing import JPasswordField
> from javax.swing import JOptionPane
>
>
> How do I get Python to recognize the java module?  I assume I need to set
> one of my environment variables?  I realize this is probably very obvious
> but I can't seem to figure it out :)
>
> Thanks everyone...
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list