Message1549
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
>>>
|
|
Date |
User |
Action |
Args |
2008-02-20 17:17:47 | admin | link | issue1692579 messages |
2008-02-20 17:17:47 | admin | create | |
|