commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pauna, Allen (MED, GEMS-IT)" <Allen.Pa...@med.ge.com>
Subject RE: [daemon] Problem with parameters.
Date Mon, 23 Feb 2004 09:53:29 GMT
Thanks for the information.

How do I run my_catalina.bat as a service on Win 2k?

This works to force Tomcat to use a particular instance of the JDK, but I
need to do this in a service. Setting JAVA_HOME at the system level is not
acceptable in my environment. This is medical software and I have to know
exactly what version of the JDK I am using. If JAVA_HOME is ever reset by
another application it may not function properly.

I need it to run as a service because then it's startup is more controllable
and it hides the application better for the end users so it is not
accidentally shut down. I wish I could pass the JAVA_HOME into the
tomcat.exe in some way as to override all of the registry settings. That
does not look possible at this time.

Thanks for the information. If I have not understood what you were saying I
hope this clarifies my situation.

-Al

-----Original Message-----
From: John Zoetebier [mailto:john.zoetebier@transparent.co.nz]
Sent: Monday, February 23, 2004 3:43 AM
To: Jakarta Commons Users List
Subject: Re: [daemon] Problem with parameters.


On Mon, 23 Feb 2004 03:07:25 -0600, Pauna, Allen (MED, GEMS-IT) 
<Allen.Pauna@med.ge.com> wrote:

> Hello group,
>
> I am attempting to run tomcat in a particular JRE. I do not wish to use
> the Default JRE defined in SOFTWARE\\JavaSoft\\Java Runtime
> Environment\\. I am not sure what the --java parameter needs to
> accomplish this.
>
> From what I can tell it cannot properly be set. It either wants the path
> to the jvm.dll to use or the auto or java. From what I can tell it looks
> like passing java causes it to fork an instance of the java.exe and run
> that. The catch is that I wish it to fork my java.exe not the default
> one in the registry. This is because running the jvm.dll does not work
> properly. For some reason if the jvm.dll is called directly then the app
> cannot do some file i/o calls. At least this is what I am seeing in my
> Tomcat webapp. It cannot load some resources.
>
> Is is it possible to fork an JRE that is not installed in the registry?
>
> What does the --java parameter look like to accomplish that if the JRE
> was installed at C:\myenv\j2sdk\jre\bin?
>
> Does the environment variable have to be set in a special way? looks
> like with java set java is here as well.
>
> Does ImagePath point to the j2sdk as well as tomcat bootloader?

To have all java appliactions use a particular JDK you can set JAVA_HOME 
on system level.
For Tomcat only:
Wrap catalina.bat in an other script, say my_catalina.bat
In my_catalina.bat you set %JAVA_HOME% to the root folder of the JDK you 
want.
Note that it MUST be a JDK because otherwise JSP compilation will fail.
Then call catalina.bat within my_catalina.bat.

-- 
John Zoetebier
Web site: http://www.transparent.co.nz

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message