• 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
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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: 6029
157
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: 6029
157
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"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!