最近MyEclipse导入新项目后,报错Access restriction: The type 'Hashtable' is not API
网上找到方法,最终解决,Mark一下:
项目右键>java build path>把右侧【libraries】中的【JRE System Library】删除,然后Add Library>JRE System Library
不明白是为什么,哪位知道的,还请留言稍作解释,以便其他看到的同学也明白受益
网上还有个方法,没有尝试,在此记录
全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.