Edit the registry.  Off the top of my head it is something like:

HKEY_LOCAL_MACHINE
  SYSTEM
    CurrentControlSet
      Services
        Apache Tomcat 4.1
          Parameters

You need to change the value for the JVM library to point to the jvm.dll in
the server directory of your jre.  Should be something like
JAVA_HOME/jre/bin/server/jvm.dll.

When ran as a service, the environment variables are not read -- possibly
because Java can not read environment variables (at least without using
methods which have been deprecated.)

-----Original Message-----
From: Fred Kreek [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 10:45 PM
To: Tomcat Users List
Subject: Re: javac problems with Tomcat as NT Service


At 22:56 26/08/03, you wrote:
>I have installed the J2SE and J2EE SDKs to c:\java.
>I installed Tomcat to c:\Tomcat.
>I have X_HOME variables for both installations in my computers Environment
>Variables.
>
>The problem is that the SDKs also install a JRE to c:\program files\java\.
>
>When I run Tomcat in a console window, everything runs fine.  Tomcat uses
>JAVA_HOME which has javac.
>
>When Tomcat runs as a service, I assume it is using the JRE in Program
>Files because JSPs that have not
>been compiled cannot be!  I receive an error and the logs point to the
>fact that Tomcat cannot create
>the javac process.
>
>Is there a way to set the Tomcat service to use my JAVA_HOME installation
>instead of the Program Files JRE?  Are there any other solutions to this
>problem?  I don't want to have to precompile every JSP page before I put
>code onto my production box, nor do I want to run my production server in
>a console window started by hand.
>
>Thanks in advance,
>Mark Turansky
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

I've never experienced the problem (i'm not running NT) but it seems to me
that you need to unset your path and set your JAVA_HOME to your java SDK
dir. This could be done in tomcat.conf (maybe its .bat on an NT) or
otherwise in catalina.bat



"There are 10 types of people when it comes to binary, those that
understand it.. and those who don't."


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to