Kimberley, you are a Goddess!  This will come in quite handy.

Thanks,

Michael

>  -----Original Message-----
> From:         [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, November 05, 2000 7:42 PM
> To:   Orion-Interest
> Subject:      Getting Orion to run as a service under Windows 2000 using
> JNT
> 
> Hiya,
> 
> Thought I'd contribute rather than just sponging off all the bright minds
> in this list.
> 
> Might be worth adding to the FAQ if it can be reproduced by someone else. 
> 
> When you install JDK1.3, you get a "jre" runtime directory installed
> within the JDK directory. If you have ever installed a runtime prior you
> will have a c:\program files\JavaSoft\JRE directory also. This is a tree:
> 
> c:\program files
>       \JavaSoft
>               \JRE
>                       \1.3
>                               \bin
>                                       \hotspot
>                               \lib
> 
> One of the problems I had getting Orion to run as a service was that it
> would just start and immediately stop. So I experimented at the command
> line with the -verbose option and the -X option. This is an example of the
> result:
> 
> C:\usr\apps\orion\Jnt101b>jnt -X
> Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 
> Error loading: C:\Program Files\JavaSoft\JRE\1.3\bin\classic\jvm.dll
> 11/06/00 13:59:05 -
> ---------------------------------
> Now starting Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 11/06/00 13:59:05 - Executing JVM Command: jnt -X
> 11/06/00 13:59:05 - Shutting down service...
> 11/06/00 13:59:05 -
> ---------------------------------
> 
> Notice the "error loading" message. Oi! There isn't a "classic" directory
> in my installed JRE. So I copied said directory from the "jre" directory
> in the JDK installation to that spot and tried it. No go. You get this:
> 
> Now starting Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 11/06/00 13:58:10 - Executing JVM Command: jnt -verbose
> /InstallAsService:Orion /SDc:\usr\apps\orion -jar orion.jar
> pps\orion\config\server.xml
> Could not create the Java virtual machine.
> 11/06/00 13:58:10 - Shutting down service...
> 11/06/00 13:58:10 -
> ---------------------------------
> 
> What? Hmm I thought and simply renaming the existing JRE directory to
> JRE_Hmm and copied the "jre" directory from my JDK directory to the same
> spot, taking care to add the "1.3" directory to the subtree. Then I ran:
> 
> C:\usr\apps\orion\Jnt101b>jnt "/InstallAsService:Orion"
> "/SDc:\usr\apps\orion" -verbose -jar orion.jar
> Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 
> 11/06/00 14:04:30 - Installing as service "Orion" (Orion).
> 11/06/00 14:04:31 -
> This has been installed as "Orion".
> This service is set to automatically start when the
> system boots.  To start the service now, use the "Services"
> icon found in the control panel.
> 11/06/00 14:04:31 -
> 
> NT Service options:
> Use /InstallAsService:ServiceName[:dependent1,dependent2,...] to
> install.
> Use /RemoveAsService:ServiceName to remove (uninstall) as a service.
> Use /SetServiceParams:ServiceName to change the startup parameters for
> this service.
> Note: Any additional parameters on the command line will be setup
>       as the startup parameters for the service when using
>       the /InstallAsService or /SetServiceParams options.
> 
> Then I went to "services" under "manage" for "My Computer" and started the
> service. Then I tried to go to http://kscott/JAdmin (my test suite) and it
> worked. I checked the services and it's still working. I then went to the
> Orion directory and viewed the JNT.log. Everything kool. Ok. Now go to my
> source directory and "ant" a build. Once this was complete, I went to the
> Orion logs directory and check out the server.log and lo and behold, the
> auto-deploy messages are there. Looking good! I then opened the Event
> Viewer and went to the Application Log. Three events logged; 
> 
> 1) Startup parameters for the service have been set to:
> /SDc:\usr\apps\orion
> -verbose
> -jar
> orion.jar
> 
> 2) The Orion service was installed. 
> 
> 3) The service was started. 
> 
> I then logged out of my machine and back in again. Checked the service and
> it's still running. Cool. Next step: reboot; After reboot went to browse
> the test site and voila. It works.
> 
> So. All appears to be working.  Hope this helps others...
> 
> Kimbo
> Senior Web Developer
> Peakhour Pty Ltd
> http://smartoffice.com.au
> http://peakhour.com.au
> http://www.geocities.com/kimmie_scott
> 
> 

winmail.dat

Reply via email to