天天看點

Eclipse中使用Ant打Android包報錯解決方案 – Perhaps JAVA_HOME does not point to the JDK

問題描述:

在eclipse中運作ant批量打包工具出錯,日志資訊如下:

d:\android\android-sdk-windows\tools\ant\build.xml:601: the following error occurred

while executing this line:

d:\android\android-sdk-windows\tools\ant\build.xml:720: the following error occurred

d:\android\android-sdk-windows\tools\ant\build.xml:734: unable to find a javac compiler;

com.sun.tools.javac.main is not on the classpath.

perhaps java_home does not point to the jdk.

it is currently set to “d:\program files\java\jre7″

解決方案:

eclipse菜單 – window – preferences – java – installed jres – 選中欄目表格中的jre項 – edit – add external jars – 選擇jdk目錄/lib/tools.jar - 确認其加入jre

system libraries– finish – ok

我的wp博文位址: