请教:在jdk的核心库rt.jar中能否扩展新的类?
我加入了新的包和类,但是使用的时候报
java.lang.NoClassDefFoundError错。
加入的方法是用winrar打开rt.jar,直接将新的.class拖入
------解决方案--------------------应该是新的.class包名问题吧
------解决方案--------------------我是说你写新的类中的包名是否和他原来类的包名一致
------解决方案--------------------重构过试试
------解决方案--------------------不要这样做。。。
------解决方案--------------------Why do you do that?
I cannot see any good point to do that.
When you see "
NoClassDefFoundError ", there must be something wrong with the CLASSPATH. I mean there MUST be something wrong with CLASSPATH, although you may check and declare it is correct.