Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Importing java within python (http://www.velocityreviews.com/forums/t585388-re-importing-java-within-python.html)

Henry Chang 01-17-2008 04:36 PM

Re: Importing java within python
 
www.jython.org

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


Laurent Pointal 01-17-2008 08:23 PM

Re: Importing java within python
 
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)
> <Christopher.Osthaus@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
>>


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...ntautlang-java

A+

Laurent.


--
Laurent POINTAL - laurent.pointal@laposte.net


All times are GMT. The time now is 12:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.