When ActiveMQ uses the IBM JDK, the logging.properties file cannot be found when started with Bin/activemq.bat, but it can also be started. Failed to start when registering as Windows system service:
FATAL | wrapper | 2013/04/27 09:56:05 | Unable to execute Java command.
FATAL | wrapper | 2013/04/27 09:56:05 | " C:\Program Files\ibm-java-x86_64-60\bin\java "... start
FATAL | wrapper | 2013/04/27 09:56:05 | Critical error:wait for JVM process failed
Method
1
: Continue to use
IBM JDKThis error can be solved by modifying activemq_home/bin/activemq.bat, we can add a logging.properties in the Conf directory: Listing 1. To modify the logging.properties path in Activemq.bat
If "%activemq_opts%"
= "" Set activemq_opts=-xmx512m
-dorg.apache.activemq.usededicatedtaskrunner=true- djava.util.logging.config.file=%
activemq_base%/conf/logging.properties
Listing 2. Logging.properties Content
handlers = Java.util.logging.ConsoleHandler
java.util.logging.consolehandler.level=info Java.util.logging.consolehandler.formatter=java.util.logging.simpleformatter
. level=INFO#
Method
2
: Specify a different version
JDKModify%activemq_home%\bin\activemq.bat before the IF exist "%home%\activemqrc_pre.bat" call "%home%\activemqrc_pre.bat" plus
Set java_home=c:\jdk1.6.0_37
if exist "%home%\activemqrc_pre.bat" call "%home%\activemqrc_pre.bat"
The method is registered as a Windows system service and then fails, and the wrapper.conf file under%activemq_home%\bin\win32 needs to be modified Wrapper.java.command=java to read:
Set. java_home=c:/jdk1.6.0_37
Wrapper.java.command=%java_home%/bin/java