Re: Importing java within python

Discussion in 'Python' started by Henry Chang, Jan 17, 2008.

  1. Henry Chang

    Henry Chang Guest

    www.jython.org

    On Jan 17, 2008 8:06 AM, Osthaus, Christopher (Mission Systems)
    <> 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
    >
    Henry Chang, Jan 17, 2008
    #1
    1. Advertising

  2. Le Thu, 17 Jan 2008 08:36:59 -0800, Henry Chang a écrit :

    > www.jython.org
    >
    > On Jan 17, 2008 8:06 AM, Osthaus, Christopher (Mission Systems)
    > <> 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
    >>


    To complement Henry Chang reply, you can also take a look at:

    http://jpype.sourceforge.net/ (Java To Python Integration)
    http://jepp.sourceforge.net/ (Java Embeded Python)

    See my other Python/Java links at
    http://www.limsi.fr/Individu/pointal/python.html#liens-intautlang-java

    A+

    Laurent.


    --
    Laurent POINTAL -
    Laurent Pointal, Jan 17, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tobiah
    Replies:
    2
    Views:
    302
    Tobiah
    Sep 14, 2003
  2. Marco Aschwanden
    Replies:
    4
    Views:
    272
    Peter Hansen
    Nov 2, 2004
  3. Replies:
    1
    Views:
    353
    David Fraser
    Nov 26, 2004
  4. plb
    Replies:
    2
    Views:
    335
  5. Replies:
    3
    Views:
    523
Loading...

Share This Page