0

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?

1 Answer 1

0

When installing tomcat service I should do:

service.bat install MyService --rename

After, I execute MyServicew.exe and change the JVM in the java tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.