1.编译出错时 2.编译正常时 Preference => Java => Installed JREs => 选中jdk点击edit => Add External JARs => 添加dt.jar和tools.jar