Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review changes caused by JIGSAW packaging and fix class loading and class traversal issues #39

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

See http://openjdk.java.net/jeps/220

In future, the bootclasspath of Java will no longer be rt.jar and the URLs 
returned by Class.getResource() will no longer be "jar:" URLs. We have to fix 
the code that does classpath traversal to respect this.

This also affects the code that creates the deprecated lists from rt.jar.

It is currently unknown if there will be a good way to enumerate all class 
files in a classpath...

Original issue reported on code.google.com by uwe.h.schindler on 31 Oct 2014 at 9:19

@uschindler
Copy link
Member

Detecting if a class in Java 9 is coming from the runtime is damn simple:
"jrt".equalsIgnoreCase(loader.getResource("java/lang/Object.class").getProtocol())
"jrt" means Java runtime and is reserved for all resources coming from the runtime, so isRuntime is very easy to detect. No bullshit needed like getting bootclasspath through RuntimeMXBean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants