摘要: 用Eclipse Debug,当跟踪进jdk api里时(比如javax.swing包里的类),无法查看某些local filed的值。这是因为jdk里的代码在打包时删除了一些用于调试的信息,以减小安装包的体积。不过可以通过重新编译jdk源代码来恢复此功能。1.在Eclipse里新建一个java工程,把jdk_home/src.zip解压缩,复制java,javax两个目录的源代码到新建工程的src目录下。2.build整个工程。如果build报Access restriction错误,是因为源代码里调用了com.sun等包的内容。可设置eclipse忽略这些错误。修改如下:Windows.. 阅读全文
posted @ 2013-09-24 15:25 rhino 阅读(691) 评论(0) 推荐(0)
摘要: 异常:Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library解决方法:这是eclipse设置问题,eclipse默认把这些受访问限制的API设成了ERROR,只要把Windows-Preferences-Java-Complicer-Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(a 阅读全文
posted @ 2013-09-24 08:39 rhino 阅读(1296) 评论(0) 推荐(0)