Message1549

Author otmarhumbel
Recipients
Date 2007-06-12.15:58:38
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The workaround (introduced after 2.2b1) would be here:

Jython 2.2b3248 on java1.6.0_01
Type "copyright", "credits" or "license" for more information.
>>> import java.awt.Frame
>>> f = java.awt.Frame()
>>> f
java.awt.Frame[frame0,0,0,0x0,invalid,hidden,layout=java.awt.BorderLayout,title=,resizable,normal]
>>> 

Importing packages only ('import java.awt' style) is still sort of a russian roulette in standalone mode: If the package is already loaded into the JVM, it will succeed, otherwise not. But the situation is getting better with JDK 1.6:

Jython 2.2b3248 on java1.6.0_01
Type "copyright", "credits" or "license" for more information.
>>> import javax
>>> javax
<java package javax 1>
>>> 


as opposed to JDK 1.5:

Jython 2.2b3248 on java1.5.0_11
Type "copyright", "credits" or "license" for more information.
>>> import javax
Traceback (innermost last):
  File "<console>", line 1, in ?
ImportError: no module named javax
>>> 
History
Date User Action Args
2008-02-20 17:17:47adminlinkissue1692579 messages
2008-02-20 17:17:47admincreate