|
From: <did...@vo...> - 2005-04-04 07:17:07
|
I identifed the origin of my problem and was able to solve it. Here is my solution : The problem was that JWS started a second JVM to run my application. I finally found out that JWS don't always do this. It first try to find out if the current JVM is suitable for the application, and then decide if the application needs a second JVM instance. To see if the current JVM is suitable, JWS compares things such as the heap size, the path to the javaw.exe command, and so on. In my case the path was different : the command path used by the wrapper was "C:\Program Files\Java\j2re1.4.2_04\bin" and the 1.4 JRE defined in JWS was in "C:\bin\j2sdk1.4.2_04\bin". I only changed the wrapper's javax.exe path and my problem was solved : - I start the Windiws NT service - it launches my application and updates it - the same JVM then runs my application => the windows service is no more considered as stopped Thanks to Leif Mortenson for his suggestion to figure out the command generated by JWS to launch that second JVM Didier D > De : "did...@vo..." > > Hi, > > I'm using the Java Service Wrapper to launch a Java Web Start application as a NT Service (W2000). To do so, I followed the instructions given here : > > > My application runs fine, but in the Service Panel, my service is showed as 'not running'. > I investigated a bit and found out that : > - the wrapper launches a JVM for JWS > - JWS launches another JVM for my application > - the JWS JVM ends normally and my application still runs fine > - the wrapper ends and the service is showed as 'not running' > - my application is still running as a 'javaw.exe' process in the windows task manager. > > The fact that the service is not showed as 'running' is confusing. The admin may want to start my application again and again. > So, is there a way to avoid this behavior? > > To illustrate this, here is the output for a console execution : > > C:\bin\wrapper>Wrapper.exe -c wrapper.conf > wrapper | --> Wrapper Started as Console > wrapper | Using system timer. > wrapperp | server listening on port 1777. > wrapper | Launching a JVM... > wrapper | command: "C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -Djnlpx.deployment.system.home="C:\WINNT\Sun\Java\Deployment" -Djnlpx.heapsize=NULL,NULL -DtrustProxy?=true -Djnlpx.deployment.user.home="C:\Documents and Settings\dduquennoy\Application Data\Sun\Java\Deployment" -Djnlpx.jvm="C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -Djava.security.policy="file:/C:\batch/wrapper.policy" -Djnlpx.home="C:\Program Files\Java\j2re1.4.2_04\javaws" -Dwrapper.home="C:\batch" -Djnlpx.remove=false -Djnlpx.offline=true -Xms15m -Xmx15m -Djava.library.path="." -classpath "wrapper.jar;C:\Program Files\Java\j2re1.4.2_04\javaws\javaws.jar;C:\Program Files\Java\j2re1.4.2_04\javaws\javaws-l10n.jar" -Dwrapper.key="IQDTkRUQsJMB39d5" -Dwrapper.port=1777 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" > -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp com.sun.javaws.Main http://JWSServ/JWSProvider/myApp.jnlp > wrapper | JVM started (PID=1692) > jvm 1 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@1ff5ea7 [...] > wrapper | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. > wrapper | JVM exited normally. > wrapper | <-- Wrapper Stopped > > C:\bin\wrapper> > > Any hint welcome, > > Didier D ------------------------------------------ Faites un voeu et puis Voila ! www.voila.fr |
|
From: Leif M. <le...@ta...> - 2005-04-12 13:40:35
|
Didier,
How did you work that out? Was it trial and error or is there a way
to get WebStart to
kick out the Java command line of the child JVM?
Cheers,
Leif
did...@vo... wrote:
>I identifed the origin of my problem and was able to solve it. Here is my solution :
>
>The problem was that JWS started a second JVM to run my application.
>
>I finally found out that JWS don't always do this. It first try to find out if the current JVM is suitable for the application, and then decide if the application needs a second JVM instance.
>To see if the current JVM is suitable, JWS compares things such as the heap size, the path to the javaw.exe command, and so on.
>
>In my case the path was different : the command path used by the wrapper was "C:\Program Files\Java\j2re1.4.2_04\bin" and the 1.4 JRE defined in JWS was in "C:\bin\j2sdk1.4.2_04\bin". I only changed the wrapper's javax.exe path and my problem was solved :
>- I start the Windiws NT service
>- it launches my application and updates it
>- the same JVM then runs my application
>=> the windows service is no more considered as stopped
>
>Thanks to Leif Mortenson for his suggestion to figure out the command generated by JWS to launch that second JVM
>
>Didier D
>
>
>
>>De : "did...@vo..."
>>
>>Hi,
>>
>>I'm using the Java Service Wrapper to launch a Java Web Start application as a NT Service (W2000). To do so, I followed the instructions given here :
>>
>>
>>My application runs fine, but in the Service Panel, my service is showed as 'not running'.
>>I investigated a bit and found out that :
>>- the wrapper launches a JVM for JWS
>>- JWS launches another JVM for my application
>>- the JWS JVM ends normally and my application still runs fine
>>- the wrapper ends and the service is showed as 'not running'
>>- my application is still running as a 'javaw.exe' process in the windows task manager.
>>
>>The fact that the service is not showed as 'running' is confusing. The admin may want to start my application again and again.
>>So, is there a way to avoid this behavior?
>>
>>To illustrate this, here is the output for a console execution :
>>
>>C:\bin\wrapper>Wrapper.exe -c wrapper.conf
>>wrapper | --> Wrapper Started as Console
>>wrapper | Using system timer.
>>wrapperp | server listening on port 1777.
>>wrapper | Launching a JVM...
>>wrapper | command: "C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -Djnlpx.deployment.system.home="C:\WINNT\Sun\Java\Deployment" -Djnlpx.heapsize=NULL,NULL -DtrustProxy?=true -Djnlpx.deployment.user.home="C:\Documents and Settings\dduquennoy\Application Data\Sun\Java\Deployment" -Djnlpx.jvm="C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -Djava.security.policy="file:/C:\batch/wrapper.policy" -Djnlpx.home="C:\Program Files\Java\j2re1.4.2_04\javaws" -Dwrapper.home="C:\batch" -Djnlpx.remove=false -Djnlpx.offline=true -Xms15m -Xmx15m -Djava.library.path="." -classpath "wrapper.jar;C:\Program Files\Java\j2re1.4.2_04\javaws\javaws.jar;C:\Program Files\Java\j2re1.4.2_04\javaws\javaws-l10n.jar" -Dwrapper.key="IQDTkRUQsJMB39d5" -Dwrapper.port=1777 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10"
>>-Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp com.sun.javaws.Main http://JWSServ/JWSProvider/myApp.jnlp
>>wrapper | JVM started (PID=1692)
>>jvm 1 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@1ff5ea7
>>
>>
>[...]
>
>
>>wrapper | JVM process exited with a code of 0, leaving the wrapper exit code set to 0.
>>wrapper | JVM exited normally.
>>wrapper | <-- Wrapper Stopped
>>
>>C:\bin\wrapper>
>>
>>Any hint welcome,
>>
>>Didier D
>>
>>
|
|
From: <nic...@uk...> - 2005-04-12 14:00:30
|
You can use process explorer (sysinternals) to get the command line of any
process.
I have used it in the past to debug the Java Web Start command line...
-Nick
Internet
le...@ta...@lists.sourceforge.net - 12/04/2005 08:39
Please respond to wra...@li...
Sent by: wra...@li...
To: wrapper-user
cc:
Subject: Re: [Wrapper-user] Re: [Wrapper+JWS] Problem with NT service
[Solved]
Didier,
How did you work that out? Was it trial and error or is there a way
to get WebStart to
kick out the Java command line of the child JVM?
Cheers,
Leif
did...@vo... wrote:
>I identifed the origin of my problem and was able to solve it. Here is my
solution :
>
>The problem was that JWS started a second JVM to run my application.
>
>I finally found out that JWS don't always do this. It first try to find
out if the current JVM is suitable for the application, and then decide if
the application needs a second JVM instance.
>To see if the current JVM is suitable, JWS compares things such as the
heap size, the path to the javaw.exe command, and so on.
>
>In my case the path was different : the command path used by the wrapper
was "C:\Program Files\Java\j2re1.4.2_04\bin" and the 1.4 JRE defined in JWS
was in "C:\bin\j2sdk1.4.2_04\bin". I only changed the wrapper's javax.exe
path and my problem was solved :
>- I start the Windiws NT service
>- it launches my application and updates it
>- the same JVM then runs my application
>=> the windows service is no more considered as stopped
>
>Thanks to Leif Mortenson for his suggestion to figure out the command
generated by JWS to launch that second JVM
>
>Didier D
>
>
>
>>De : "did...@vo..."
>>
>>Hi,
>>
>>I'm using the Java Service Wrapper to launch a Java Web Start application
as a NT Service (W2000). To do so, I followed the instructions given here :
>>
>>
>>My application runs fine, but in the Service Panel, my service is showed
as 'not running'.
>>I investigated a bit and found out that :
>>- the wrapper launches a JVM for JWS
>>- JWS launches another JVM for my application
>>- the JWS JVM ends normally and my application still runs fine
>>- the wrapper ends and the service is showed as 'not running'
>>- my application is still running as a 'javaw.exe' process in the windows
task manager.
>>
>>The fact that the service is not showed as 'running' is confusing. The
admin may want to start my application again and again.
>>So, is there a way to avoid this behavior?
>>
>>To illustrate this, here is the output for a console execution :
>>
>>C:\bin\wrapper>Wrapper.exe -c wrapper.conf
>>wrapper | --> Wrapper Started as Console
>>wrapper | Using system timer.
>>wrapperp | server listening on port 1777.
>>wrapper | Launching a JVM...
>>wrapper | command: "C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe"
-Djnlpx.deployment.system.home="C:\WINNT\Sun\Java\Deployment"
-Djnlpx.heapsize=NULL,NULL -DtrustProxy?=true
-Djnlpx.deployment.user.home="C:\Documents and
Settings\dduquennoy\Application Data\Sun\Java\Deployment"
-Djnlpx.jvm="C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe"
-Djava.security.policy="file:/C:\batch/wrapper.policy"
-Djnlpx.home="C:\Program Files\Java\j2re1.4.2_04\javaws"
-Dwrapper.home="C:\batch" -Djnlpx.remove=false -Djnlpx.offline=true -Xms15m
-Xmx15m -Djava.library.path="." -classpath "wrapper.jar;C:\Program
Files\Java\j2re1.4.2_04\javaws\javaws.jar;C:\Program Files\Java\j2re1.4.2
_04\javaws\javaws-l10n.jar" -Dwrapper.key="IQDTkRUQsJMB39d5"
-Dwrapper.port=1777 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE"
-Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper"
-Dwrapper.cpu.timeout="10"
>>-Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp
com.sun.javaws.Main http://JWSServ/JWSProvider/myApp.jnlp
>>wrapper | JVM started (PID=1692)
>>jvm 1 | WrapperManager class initialized by thread: main Using
classloader: sun.misc.Launcher$AppClassLoader@1ff5ea7
>>
>>
>[...]
>
>
>>wrapper | JVM process exited with a code of 0, leaving the wrapper exit
code set to 0.
>>wrapper | JVM exited normally.
>>wrapper | <-- Wrapper Stopped
>>
>>C:\bin\wrapper>
>>
>>Any hint welcome,
>>
>>Didier D
>>
>>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
**********************************************************************************************
BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.
BNP Paribas Securities Services London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in the
United Kingdom.
BNP Paribas Fund Services UK Limited is authorised and
regulated by the Financial Services Authority.
|