Message11933
We may not need a third party library. This works on Java 9 and Java 10 to list all classes in the java.base module:
from java.lang.module import ModuleFinder
from contextlib import closing
finder = ModuleFinder.ofSystem()
ref = finder.find('java.base')
with closing(ref.get().open()) as reader:
resources = reader.list().toArray()
print resources
Ignores such niceties as the Stream interface etc. Improve accordingly for real usage, such as writing in Java and putting into the Jython runtime.
Also it's important to know that import * works on any library that is not in a Jigsaw module. This presumably only applies for what used to be in the rt.jar, plus additions.
A third party library might result in a faster scanner however. |
|
Date |
User |
Action |
Args |
2018-05-02 00:29:23 | zyasoft | set | messageid: <1525220963.53.0.682650639539.issue2362@psf.upfronthosting.co.za> |
2018-05-02 00:29:23 | zyasoft | set | recipients:
+ zyasoft, fwierzbicki, amak, darjus, rpan, sfelts, mr, alanb |
2018-05-02 00:29:23 | zyasoft | link | issue2362 messages |
2018-05-02 00:29:21 | zyasoft | create | |
|