I am looking for a neat way to override a class from the bootstrap class path, rt.jar
. The reason for the OpenJDK7 error is http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7104625
The fix for this error is trivial (see related email), change to sun.awt.X11.XComponentPeer
. Therefore, I was wondering if there is an easy way to override only one affected class in my class path without repackaging / rebuilding rt.jar (so the fix will not be lost the next time OpenJDK is automatically updated).
Ideally, this will also affect Eclipse ...
I assume java -Djava.system.class.loader=myClassLoader
will work? Is there any other way to override one class with such a “fix”? (Note: not used in my own code, but deep in Java AWT code)
source share