我試圖按照this tutorial,但我有進口問題。缺少的庫com.sun.tools.attach
我:
The import com.sun.tools cannot be resolved
符合
import com.sun.tools.attach.VirtualMachine;
我試圖尋找太陽/ Oracle的網站上的一些信息,但我沒有發現任何有用的。
我正在JDK 1.6.0_31上開發。
我試圖按照this tutorial,但我有進口問題。缺少的庫com.sun.tools.attach
我:
The import com.sun.tools cannot be resolved
符合
import com.sun.tools.attach.VirtualMachine;
我試圖尋找太陽/ Oracle的網站上的一些信息,但我沒有發現任何有用的。
我正在JDK 1.6.0_31上開發。
tools.jar
需要被添加到IDE中的庫路徑和程序的類路徑。 tools.jar
文件位於JDK的lib
目錄中。
例如,如果JDK安裝在C:\Program Files\Java\jdk1.7.0_11
中,則tools.jar
文件將在C:\Program Files\Java\jdk1.7.0_11\lib\tools.jar
處找到。
您應該將tools.jar
添加到您的classpath
。
請參閱本教程以包含tools.jar
。
http://hobione.wordpress.com/2009/03/11/missing-comsuntoolsjar142/
儘管此鏈接可能回答問題,但最好在此處包含答案的基本部分,並提供供參考的鏈接。如果鏈接頁面更改,則僅鏈接答案可能會失效。 – 2012-08-10 19:33:46