缺少库 com.sun.tools.attach [英] Missing Library com.sun.tools.attach
问题描述
我试图遵循 this教程,但我在导入时遇到问题.
I've tried to follow this tutorial, but I have problem with imports.
我得到了:
The import com.sun.tools cannot be resolved
在线
import com.sun.tools.attach.VirtualMachine;
我试图在 Sun/Oracle 网站上查找一些信息,但没有找到任何有用的信息.
I've tried to look for some info on Sun/Oracle website, but I have not found anything helpful.
我正在 JDK 1.6.0_31 上开发.
I am developing on JDK 1.6.0_31.
推荐答案
tools.jar
需要添加到 IDE 的库路径和程序的类路径中.tools.jar
文件位于 JDK 的 lib
目录中.
tools.jar
needs to be added to the IDE's library path and the program's classpath. The tools.jar
file is found in the JDK's lib
directory.
例如,如果 JDK 安装在 C:\Program Files\Java\jdk1.7.0_11
中,则 tools.jar
文件将位于 >C:\Program Files\Java\jdk1.7.0_11\lib\tools.jar
.
For example, if the JDK were installed into C:\Program Files\Java\jdk1.7.0_11
then the tools.jar
file will be found at C:\Program Files\Java\jdk1.7.0_11\lib\tools.jar
.
这篇关于缺少库 com.sun.tools.attach的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!