Link to home
Start Free TrialLog in
Avatar of idforpg1
idforpg1

asked on

EventID: 4096 Could not initialize the Java Virtual Machine

Hi,

We are able to start the java application from cmd line using run.bat
java_home is set in run.bat


I am setting java_home as part of windows service installation. I get below error when I try starting application as service. JVM is working fine when we run from cmd line. What am I missing?

EventID: 4096 Could not initialize the Java Virtual Machine
Avatar of Wingman300
Wingman300

Was anything about Symantec mentioned in the error or is that the full error?  I have seen this with a symantec error.
Avatar of idforpg1

ASKER

Nope, there is no symantec error. Above error is the full error from windows event logs
Avatar of Mick Barry
try adding some logging to your bat to get a better idea whats going on

and make sure you explicitly specify any paths in the bat that are needed. Its not the same as running it from a shell
Windows batch file is only used to create the windows service, service details along with parameters are stored in windows registry.

How can I debug the windows service?
what does the service actually run?
service runs a java application
i realise that, i mean what command
below is the command used in windows batch file to install application service:

cats.exe -install "VCats" %1\jre\bin\%3\jvm.dll -Xms512M -Xmx768M -Djava.class.path=%1\lib\tools.jar;%2\bin\run.jar;%2\lib\crimson.jar  -DCAT_HOME1=C:\\cats\\conf\\  -DCAT_HOME2=C:\\cats\\conf\\  -DCAT_HOME3=C:\\cats\\conf\\  -start org.jboss.Main -params -c cats  -stop org.jboss.Main -params tomcat -method systemExit -out %4\CatServer.log -err %4\CatServer.err -current %2\bin


%1: JDK home
%2: Jboss home
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial