코린이의 기록

[gradle] Could not find tools.jar 본문

JAVA

[gradle] Could not find tools.jar

코린이예요 2020. 6. 11. 14:35
반응형

$ where is java
java: /usr/bin/java /etc/java /usr/share/java
$ ls -l /usr/bin/java
/usr/bin/java -> /etc/altertatives/java
$ ls -l /etc/altertatives/java
/etc/alternatives/java -> /ujsr/lib/jvm/jre1.8.0_251/bin/java
$ update-alternatives --list javac
/usr/lib/jvm/jdk1.8.0_191/bin/javac
$ export JAVA_HOME=$(dirname $(dirname $(update-alternatives --list javac)))
$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.8.0_191

 

 

gradle Re-build

 

 

* update-alternatives --list javac 했을때, 경로가 여러개 나온다면, JAVA_HOME export를 직접 해준다.

ex. export JAVA_HOME=[자바경로]

 

 

 

 

 

반응형
Comments