error: package com.sun.tools.javac.util does not exist
I got this problem when I try to build kotlin/jvm with gradle,
I want to post this to others new to jvm, since jdk-9, there is no tools.jar
. setting a classpath
is good to go.
JAVA_HOME= path_to_jdk
JRE_HOME= path_to_jre
PATH= ;%JAVA_HOME%\bin;%JRE_HOME%\bin
CLASSPATH=.;%JAVA_HOME%\lib;%JRE_HOME%\lib
This class is found in tools.jar
, which is not part of the JRE.