• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

service.bat install not finding JVM listed in Tomcat9w

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. If you have a minute, I successfully ran the service.bat install (sans setting any JAVA_HOME or JRE_HOME) several months ago and am trying to retrace my steps. I set the jvm.dll path in Tomcat9w.

However, I tried service.bat install today, with the same Tomcat9w path, but I am getting error can't find JAVA_HOME or JRE_HOME. It doesn't appear to care about Tomcat9w.

Is there a switch I'm missing or something to get service.bat to look at Tomcat9w?

Thank you very much
 
Sheriff
Posts: 6259
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you launch Java from the command line?  I would think that any bat file would need either Java in the PATH variable or the JAVA_HOME variable set.
 
Tommy Griffith
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Knute. Thank you. Yeah, I was reviewing service.bat and it does look for those variables. However, the last time I did a Tomcat service install in May, I know I didn't set any environment variables. There are none in there right now. I also read in the Tomcat documentation that a service install doesn't require environment variables.

Do you know if there is a way to run service.bat install with additional command line args for path?

I tried this...no errors but I don't see the service in the Windows Services window....

tomcat9 //IS//Tomcat90 --DisplayName="Apache Tomcat 90" --JavaHome="C:\Program Files\Java\jdk1.8.0_131\jre\bin" --jvm="C:\Program Files\Java\jdk1.8.0_131\jre\bin\server\jvm.dll"
 
Knute Snortum
Sheriff
Posts: 6259
167
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would think the --JavaHome value would look like this:

--JavaHome="C:\Program Files\Java\jdk1.8.0_131"
 
Don't listen to Steve. Just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!