Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make cannot find tools.jar

Running Ubuntu 12.04

I have added to PATH: /home/jeffrey/jdk1.6.0_43/lib

I am attempting to build from source using Make:

make -j16

But encounter the error:

build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.

Can anyone explain to me why Make cannot find tools.jar?

EDIT

JAVA_HOME=/home/jeffrey/jdk1.6.0_43/bin/java

Determined by entering env command into the shell. Furthermore, this is set for all users in the etc/profile

Additionally:

jeffrey@jeffrey-Satellite-M645:~/WORKING_DIRECTORY$ java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
jeffrey@jeffrey-Satellite-M645:~/WORKING_DIRECTORY$ 
like image 440
Roy Hinkley Avatar asked Aug 16 '13 15:08

Roy Hinkley


People also ask

Can not determine path to Tools jar?

The problem is with version of JDK you are using. The Intellij version 2020.2 supports only upto JDK 14. So either you have to lower the JDK version to 14 or update the IntelliJ to a newer version like 2021.

What is the use of tools jar in Java?

The jar command is a general-purpose archiving and compression tool, based on the ZIP and ZLIB compression formats. Initially, the jar command was designed to package Java applets or applications; however, beginning with JDK 9, users can use the jar command to create modular JARs.


1 Answers

Setting the ANDROID_JAVA_HOME environment variable to JDK path, fixes this error.

I found the answer with this SO post.

like image 81
Roy Hinkley Avatar answered Oct 13 '22 00:10

Roy Hinkley