[ANT] Unable to locate tools.jar


Jika kita mendapat error saat menjalankan ant

ANT Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.26/lib/tools.jar

Pastikan dimana letak JDK yang memang mempunyai tools.jar.
jalankan perintah

locate tools.jar

misalnya anda mendapatkan hasil seperti ini :

/home/nurrak/master/easyeclipse-expert-java-1.3.1.1/jre/lib/tools.jar
/home/nurrak/master/easyeclipse-expert-java-1.4.0/jre/lib/tools.jar
/usr/lib/jvm/java-1.5.0-gcj-4.4/lib/tools.jar
/usr/lib/jvm/java-6-openjdk/lib/tools.jar
/usr/share/java/jpf-tools.jar

maka arahkan JAVA_HOME anda ke /usr/lib/jvm/java-6-openjdk/lib/tools.jar

export JAVA_HOME="/usr/lib/jvm/java-6-openjdk/"
export PATH=$PATH:$JAVA_HOME/bin

Agar lebih permanen tambahkan dua baris di atas dalam file /etc/profile

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s