-
Notifications
You must be signed in to change notification settings - Fork 40
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
Java 9 compatibility #108
Comments
Also note that after getting the path, I get the following warnings: WARNING: An illegal reflective access operation has occurred I seem to remember reading that Oracle will be better protecting in the future, but I can't find my reference at the moment, and I don't recall if there will be other, preferred ways of doing reflection in the future... Thanks again! |
To work around this problem, I added the following to my JUnit test:
|
So the main issue that this was opened on is now resolved which is the exception being thrown. |
com.openpojo.reflection.java.packageloader.boot.JavaBootClassLoader is hard coded to pull the class path from System.getProperty("sun.boot.class.path"). However, this system property has been removed in Java 9, resulting in a null pointer exception.
In debug mode, I was able to manually replace this with "java.class.path", which appeared to work correctly.
See https://docs.oracle.com/javase/8/docs/technotes/tools/windows/findingclasses.html
I see this property is also available in Java 1.7 and 1.8, but I have not checked earlier versions.
For backwards compatibility, it might be useful to check "java.class.path" first, and then "sun.boot.class.path" if the former returns a null.
Love your product, and want to keep using it in Java 9! 😄
The text was updated successfully, but these errors were encountered: