anchor.diff:          -Dkaraf.data="%KARAF_DATA%" ^
           -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" ^
           %KARAF_OPTS% %MAIN% %ARGS%
  +    ) else (
  +        echo There is a Root instance already running with name %ROOT_INSTANCE_NAME% and pid %ROOT_INSTANCE_PID%
  +        goto :END
  +    )
   
       rem If KARAF_DAEMON is defined, auto-restart is bypassed and control given
       rem back to the operating system
  
positive.code: 
  :EXECUTE_STOP
      SET MAIN=org.apache.karaf.main.Stop
      shift
      goto :RUN_LOOP
  
  :EXECUTE_STATUS
      SET MAIN=org.apache.karaf.main.Status
      shift
      goto :RUN_LOOP
  
  :EXECUTE_CONSOLE
      shift
      goto :RUN_LOOP
  
  
negative.code:     set JAVA=%JAVA_HOME%\bin\java
  :Check_JAVA_END
  
  :CheckRootInstance
      set ROOT_INSTANCE_RUNNING=false
      if exist "%KARAF_HOME%\instances\instance.properties" (
          for /f "delims=" %%x in ( 'findstr "item.0.pid" "%KARAF_HOME%\instances\instance.properties" ' ) do @set pid=%%x
          for /f "delims=" %%i in ( 'findstr "item.0.name" "%KARAF_HOME%\instances\instance.properties" ' ) do @set name=%%i
      )
      set ROOT_INSTANCE_PID=%pid:~13%
  
      set ROOT_INSTANCE_NAME=%name:~14%
      if not "%ROOT_INSTANCE_PID%"=="0" (
          tasklist /fi "PID eq %ROOT_INSTANCE_PID%" /fi "STATUS eq running" /fo 2>NUL
          if "%ERRORLEVEL%"=="0" set ROOT_INSTANCE_RUNNING=true
      )
  
  
  if not exist "%JAVA_HOME%\bin\server\jvm.dll" (
      if not exist "%JAVA_HOME%\jre\bin\server\jvm.dll" (
          echo WARNING: Running Karaf on a Java HotSpot Client VM because server-mode is not available.
  