Overriding single classes from rt.jar

前端 未结 4 1476
无人共我
无人共我 2021-01-03 06:55

I\'m looking for a neat way to override a class from the bootstrap class path, rt.jar. The reason is OpenJDK7 bug http://bugs.sun.com/bugdatabase/view_bug.do?bu

4条回答
  •  醉话见心
    2021-01-03 07:03

    I think @ziesemer is correct, but you may be able to use the classloader to replace the offending class when your app is bootstrapping. This may be cleaner if you don't want to worry about the JDK updating underneath you, though you'd have to stick this bootstrapping classloader code into every app you are working on.

提交回复
热议问题