Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-3979

service.bat issue when using JRE_HOME on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 9.0.0-M7, 8.0.11, 8.0.12
    • 9.0.0-M8, 8.0.13
    • None
    • None

    Description

      Pre requisites to reproduce this issue:

      1. Windows environment
      2. set JRE_HOME instead of JAVA_HOME

      Example:

       

      >set JRE_HOME=C:\java\jre-8
      >service.bat install tomee_service
      
      Installing the service 'tomee_service' ...
      Using CATALINA_HOME:    "C:\Users\Administrator\Documents\apache-tomee-8.0.11-plus\apache-tomee-plus-8.0.11"
      Using CATALINA_BASE:    "C:\Users\Administrator\Documents\apache-tomee-8.0.11-plus\apache-tomee-plus-8.0.11"
      Using JAVA_HOME:        ""
      Using JRE_HOME:         "C:\java\jre-8"
      Using JVM:              "C:\java\jre-8\bin\server\jvm.dll"
      Using Service User:     ""
      Installed, will now configure TomEE
      11 was unexpected at this time. 

       

      As part of the work done in https://issues.apache.org/jira/browse/TOMEE-2261,  The origin of the issue happens in this validation: 

      https://github.com/apache/tomee/blob/45b1ba51ebfc31691bbf517d9d3d00c7fe86e48f/tomee/apache-tomee/src/main/resources/service.bat#L242-L248 because `JAVA_MAJOR_VERSION` is note defined when JRE_HOME is used (independently if it's Java 8, 11 etc.):https://github.com/apache/tomee/blob/45b1ba51ebfc31691bbf517d9d3d00c7fe86e48f/tomee/apache-tomee/src/main/resources/service.bat#L88-L90

       

       

       

      Attachments

        Activity

          People

            cesarhernandezgt Cesar Hernandez
            cesarhernandezgt Cesar Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h