пт, 19 июл. 2019 г. в 15:02, Lemke, Michael ST/HZA-ZIC2
> I have tomcat (9.0.22) running as a service on Windows with Oracle's Java 8. 
> I now want to move this to OpenJdk 12 to keep current and I have quite some 
> problems to have tomcat find the OpenJdk installation. With Oracle it just 
> worked with the Jvm=auto option for the tomcat service. With OpenJdk I only 
> got it to work by messing around with JAVA_HOME, which is no fun especially 
> for services. Without it tomcat doesn't find Java or uses Oracle's if I don't 
> remove it first.
> Now is this a tomcat problem or a OpenJdk installation problem?
> For OpenJdk I used
> https://github.com/ojdkbuild/ojdkbuild/releases/download/12.0.1-1/java-12-openjdk-
> and have the installer set the Windows Registry entries under JavaSoft
> From what I found on the net these Registry settings changed with Java 9.

I use OpenJDK 12.0.1 on Windows with Tomcat 9, successfully.

I am using a build of OpenJDK that was packed as a zip file, so that
is from a different vendor than yours.
I cannot comment on all steps of your experience with installer, but
here are a few comments/ pointers

1. I installed Tomcat as a service using "service.bat" file included
with Tomcat.

The JAVA_HOME environment variable is used by "service.bat" file only.
I set it at command prompt before running the service.bat file. E.g.

set JAVA_HOME=C:\Programs\java-12

There is no need to set the variable globally. Your frustration is uncalled for.

2. The path to Java can be edited via a GUI configuration dialog for
the service runner. The dialog is shown when you run "tomcat9w.exe".

3. The service runner is provided by Apache Commons Daemon project and
is used by Apache Tomcat (and other projects) "as is". (The service
runner for Windows is called "Procrun" within that project.)


"tomcat9.exe" and "tomcat9w.exe" are renamed copies of "prunsrv.exe"
and "prunmgr.exe" respectively.

I do not remember how procrun searches for Java jvm.dll. I's been a
long time since I studied their source code. If that algorithm could
be improved, it is an issue with Apache Commons Daemon project.

If some documentation is lacking, it could be improved in Apache Tomcat project.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to