Issue2630

classification
Title: jython 2.7.1 cannot import java.awt.*
Type: behaviour Severity: major
Components: Versions: Jython 2.7
Milestone: Jython 2.7.1
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jamesmudd, sergei175
Priority: Keywords:

Created on 2017-10-13.02:21:45 by sergei175, last changed 2017-10-17.18:01:44 by jamesmudd.

Messages
msg11620 (view) Author: Sergei (sergei175) Date: 2017-10-13.02:21:43
I'm using Jython 2.7.1 and I notice that it cannot import by default the standard Java libraries when using JDK9 (on ubuntu).  Example:

>from java.awt import *
>c=Color.red

This failed.  I have to import all classes explicitly, i.e. "from java.awt import Color". I guess, Java9 has different locations of the standard jar libraries. How to enable this feature again?
msg11621 (view) Author: James Mudd (jamesmudd) Date: 2017-10-13.11:55:22
Duplicate of #2362
msg11622 (view) Author: Sergei (sergei175) Date: 2017-10-13.23:29:13
Thanks, I consider this is a very serious problem that breaks just everything around Jython, i.e. documentation, blogs, books, etc. It has not been solved for 2 years, according to #2362.  Maybe there is simple workaround?
msg11623 (view) Author: James Mudd (jamesmudd) Date: 2017-10-17.18:01:44
The simple workaround I guess is to use Java 8 not 9. Java 9 has only been out a few weeks and no Jython versions at the moment claim to fully support it.

Having said that I agree this is a serious issue, which need to be fixed as soon as possible.
History
Date User Action Args
2017-10-17 18:01:44jamesmuddsetmessages: + msg11623
2017-10-13 23:29:13sergei175setmessages: + msg11622
2017-10-13 11:55:22jamesmuddsetnosy: + jamesmudd
messages: + msg11621
2017-10-13 02:21:45sergei175create