RE: tomcat and openjdk as windows service
On July 19, 2019 6:26 PM Michael Lemke wrote: >On July 19, 2019 5:51 PM André Warnier wrote: >>For some maybe useful background information, it may be useful to read this : >>https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11 > >Thanks. Actually, I knew this as I am using procrun for an additional service, >which also doesn't find the OpenJdk. > >So doesn't this boil down to why procrun doesn't pick up the OpenJdk >installation? Answering to myself: indeed it does. I created an issue https://issues.apache.org/jira/browse/DAEMON-404 and added a pull request. This fixes the problem for me. Maybe someone can have a look? Michael > >I verified that the ojdkbuild installer sets the appropriate Registry keys. Is >this a bug in procrun or does Oracle play some additional tricks? > >Michael > >> >>On 19.07.2019 14:01, Michael Lemke wrote: >>> 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-12.0.1.12-1.windows.ojdkbuild.x86_64.msi >>> >>> and have the installer set the Windows Registry entries under JavaSoft >>> >>> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1 >>> >>> From what I found on the net these Registry settings changed with Java 9. >>> >>> So what am I doing wrong? >>> >>> Thanks, >>> Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat and openjdk as windows service
On July 19, 2019 5:51 PM André Warnier wrote: >For some maybe useful background information, it may be useful to read this : >https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11 Thanks. Actually, I knew this as I am using procrun for an additional service, which also doesn't find the OpenJdk. So doesn't this boil down to why procrun doesn't pick up the OpenJdk installation? I verified that the ojdkbuild installer sets the appropriate Registry keys. Is this a bug in procrun or does Oracle play some additional tricks? Michael > >On 19.07.2019 14:01, Michael Lemke wrote: >> 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-12.0.1.12-1.windows.ojdkbuild.x86_64.msi >> >> and have the installer set the Windows Registry entries under JavaSoft >> >> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1 >> >> From what I found on the net these Registry settings changed with Java 9. >> >> So what am I doing wrong? >> >> Thanks, >> Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and openjdk as windows service
Hi. For some maybe useful background information, it may be useful to read this : https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11 On 19.07.2019 14:01, Lemke, Michael ST/HZA-ZIC2 wrote: 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-12.0.1.12-1.windows.ojdkbuild.x86_64.msi and have the installer set the Windows Registry entries under JavaSoft HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1 From what I found on the net these Registry settings changed with Java 9. So what am I doing wrong? Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat and openjdk as windows service
пт, 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-12.0.1.12-1.windows.ojdkbuild.x86_64.msi > > and have the installer set the Windows Registry entries under JavaSoft > > HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1 > > 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.) http://commons.apache.org/proper/commons-daemon/procrun.html "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
tomcat and openjdk as windows service
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-12.0.1.12-1.windows.ojdkbuild.x86_64.msi and have the installer set the Windows Registry entries under JavaSoft HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1 >From what I found on the net these Registry settings changed with Java 9. So what am I doing wrong? Thanks, Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org