My Windows 10 already have JAVA_HOME
set as environment variable pointing to JDK8. But I want to run this Tomcat 9 with OpenJDK 12.
I download Tomcat 9 64-bit zip. When I run it manually via startup.bat
, all I need to do is create bin\setenv.bat
and put the new value of JAVA_HOME
there as stated in the RUNNING.txt that accompanies the package.
But, if I install Tomcat as a service using service.bat install MyService
it uses the JAVA_HOME
of Windows, which is expected.
The problem is when I try to follow these instructions to update my installed service and change the Java home.
I tried this with no success:
>tomcat9.exe //US//MyService --JavaHome=path\to\openjdk
I'm doing something wrong?