|
From: whack er <wha...@ya...> - 2003-11-25 12:27:33
|
Greetings I have experimented with the wrapper test program on Windows XP and have the following doubt: 1.I beleive that the console window would not be displayed if I run as a service on the Windows platform. 2.If run on LINUX, I beleive that the console window would be displayed. 3.Since I am evaluating the use of the wrapper, I would not like to display the console to end users and leave them guessing. 4.If I run a normal Java application using javaw then there is no console displayed, can I do the same on Windows and Linux using the wrapper ? 5.Are there any optionsto run on the system tray or KDE task bar ? TIA --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now |
|
From: Leif M. <le...@ta...> - 2003-11-25 14:36:19
|
whack er wrote: > Greetings > > I have experimented with the wrapper test program on Windows XP and > have the following doubt: > > 1.I beleive that the console window would not be displayed if I run as > a service on the Windows platform. In all released versions of the Wrapper, it is not possible to display the java console when running as an NT service. It sounds like this is what you want, so this is a good thing. I have already added the ability to optionally display the console even when running as an interactive service. This will be in the next release. > 2.If run on LINUX, I beleive that the console window would be displayed. Yes and no. The shell script that is used to launch the wrapper on UNIX systems allows a great amount of control over how it is launched. The script behaves like a standard init script, in that it takes a single command which tells the script what to do. The first command 'console', will launch the Wrapper in the shell from which the script is executed. The user will be able to see all of the console output and be able to stop the application by pressing CTRL-C. The second command is 'start'. This sounds like what you want. This will launch the wrapper in the background as a daemon process. It will stay running even if the shell is closed and the user will not be able to see the console output. Depending on how you have configured the wrapper's logging, the console output may still be written to the wrapper.log file. > 3.Since I am evaluating the use of the wrapper, I would not like to > display the console to end users and leave them guessing. As described in 1 and 2. You should be able to hide the console on both Windows and Linux platforms. > 4.If I run a normal Java application using javaw then there is no > console displayed, can I do the same on Windows and Linux using the > wrapper ? See above. > 5.Are there any optionsto run on the system tray or KDE task bar ? Not currently. The Wrapper does not interact directly with the Window Manager on Unix or Windows platforms. This is on my list of things that I would eventually like to support however. Cheers, Leif |
|
From: whack er <wha...@ya...> - 2003-11-25 18:35:59
|
Leif Thanks for the clarifications, here is another doubt When I run the TestWrapper as a Windows service the swing GUI is not displayed. Can I understand that when the Wrapper runs as a service there is no desktop interaction. Is this as designed or is this how it should be ? TIA Leif Mortenson <le...@ta...> wrote: whack er wrote: > Greetings > > I have experimented with the wrapper test program on Windows XP and > have the following doubt: > > 1.I beleive that the console window would not be displayed if I run as > a service on the Windows platform. In all released versions of the Wrapper, it is not possible to display the java console when running as an NT service. It sounds like this is what you want, so this is a good thing. I have already added the ability to optionally display the console even when running as an interactive service. This will be in the next release. > 2.If run on LINUX, I beleive that the console window would be displayed. Yes and no. The shell script that is used to launch the wrapper on UNIX systems allows a great amount of control over how it is launched. The script behaves like a standard init script, in that it takes a single command which tells the script what to do. The first command 'console', will launch the Wrapper in the shell from which the script is executed. The user will be able to see all of the console output and be able to stop the application by pressing CTRL-C. The second command is 'start'. This sounds like what you want. This will launch the wrapper in the background as a daemon process. It will stay running even if the shell is closed and the user will not be able to see the console output. Depending on how you have configured the wrapper's logging, the console output may still be written to the wrapper.log file. > 3.Since I am evaluating the use of the wrapper, I would not like to > display the console to end users and leave them guessing. As described in 1 and 2. You should be able to hide the console on both Windows and Linux platforms. > 4.If I run a normal Java application using javaw then there is no > console displayed, can I do the same on Windows and Linux using the > wrapper ? See above. > 5.Are there any optionsto run on the system tray or KDE task bar ? Not currently. The Wrapper does not interact directly with the Window Manager on Unix or Windows platforms. This is on my list of things that I would eventually like to support however. Cheers, Leif ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now |
|
From: whack er <wha...@ya...> - 2003-11-27 18:04:49
|
I got this now. I was able to use the setting on the wrapper.conf to display the GUI on Windows XP and yet hide the console. Any chances of hiding the console when not running as a service on Windows XP ? TIA Leif Thanks for the clarifications, here is another doubt When I run the TestWrapper as a Windows service the swing GUI is not displayed. Can I understand that when the Wrapper runs as a service there is no desktop interaction. Is this as designed or is this how it should be ? TIA Leif Mortenson <le...@ta...> wrote: whack er wrote: > Greetings > > I have experimented with the wrapper test program on Windows XP and > have the following doubt: > > 1.I beleive that the console window would not be displayed if I run as > a service on the Windows platform. In all released versions of the Wrapper, it is not possible to display the java console when running as an NT service. It sounds like this is what you want, so this is a good thing. I have already added the ability to optionally display the console even when running as an interactive service. This will be in the next release. > 2.If run on LINUX, I beleive that the console window would be displayed. Yes and no. The shell script that is used to launch the wrapper on UNIX systems allows a great amount of control over how it is launched. The script behaves like a standard init script, in that it takes a single command which tells the script what to do. The first command 'console', will launch the Wrapper in the shell from which the script is executed. The user will be able to see all of the console output and be able to stop the application by pressing CTRL-C. The second command is 'start'. This sounds like what you want. This will launch the wrapper in the background as a daemon process. It will stay running even if the shell is closed and the user will not be able to see the console output. Depending on how you have configured the wrapper's logging, the console output may still be written to the wrapper.log file. > 3.Since I am evaluating the use of the wrapper, I would not like to > display the console to end users and leave them guessing. As described in 1 and 2. You should be able to hide the console on both Windows and Linux platforms. > 4.If I run a normal Java application using javaw then there is no > console displayed, can I do the same on Windows and Linux using the > wrapper ? See above. > 5.Are there any optionsto run on the system tray or KDE task bar ? Not currently. The Wrapper does not interact directly with the Window Manager on Unix or Windows platforms. This is on my list of things that I would eventually like to support however. Cheers, Leif ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now --------------------------------- Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard |
|
From: Leif M. <le...@ta...> - 2003-11-29 17:30:54
|
whack er wrote: > I got this now. I was able to use the setting on the wrapper.conf to > display the GUI on Windows XP and yet hide the console. > > Any chances of hiding the console when not running as a service on > Windows XP ? The wrapper currently runs as a console application so it requires a console when not running as a service. I like the idea of being able to get rid of this console for certain applications. I added a feature request and well try to get this implemented in a future release. Most likely this will require a second wrapper executable, maybe WrapperW.exe. Feel free to monitor the feature request so you will know when any progress is made on this. http://sourceforge.net/tracker/index.php?func=detail&aid=851223&group_id=39428&atid=425190 Cheers, Leif |
|
From: Jacques B. <jac...@gm...> - 2003-12-01 08:19:58
|
Hi there. What is the environment variable to add the win/system32 folder to the wrapper.java.library.path? Where can I get a list of the environment variables. Couldn't find it in the docs. Thanx much. Jacques |
|
From: Jacques B. <jac...@gm...> - 2003-12-01 08:39:11
|
Also, is it possible to hide the console when not running as an NT service? Jacques |
|
From: Leif M. <le...@ta...> - 2003-12-01 11:59:14
|
Jacques,
It is not possible to hide the console when the Wrapper is running
as a console
application. Stay tuned however, because I am already planning on
making this
possible in a future version. Monitor the following feature request so
you know
when it gets added.
http://sourceforge.net/tracker/?func=detail&aid=851223&group_id=39428&atid=425190
Cheers,
Leif
Jacques Bosch wrote:
>Also, is it possible to hide the console when not running as an NT service?
>
>Jacques
>
>
|
|
From: Jacques B. <jac...@gm...> - 2003-12-01 12:17:14
|
OK Thank you. ----- Original Message ----- From: "Leif Mortenson" <le...@ta...> To: <wra...@li...> Sent: Monday, December 01, 2003 1:59 PM Subject: Re: [Wrapper-user] Hide console : Jacques, : It is not possible to hide the console when the Wrapper is running : as a console : application. Stay tuned however, because I am already planning on : making this : possible in a future version. Monitor the following feature request so : you know : when it gets added. : : http://sourceforge.net/tracker/?func=detail&aid=851223&group_id=39428&atid=425190 : : Cheers, : Leif : : Jacques Bosch wrote: : : >Also, is it possible to hide the console when not running as an NT service? : > : >Jacques : > : > : : : : : ------------------------------------------------------- : This SF.net email is sponsored by: SF.net Giveback Program. : Does SourceForge.net help you be more productive? Does it : help you create better code? SHARE THE LOVE, and help us help : YOU! Click Here: http://sourceforge.net/donate/ : _______________________________________________ : Wrapper-user mailing list : Wra...@li... : https://lists.sourceforge.net/lists/listinfo/wrapper-user : : : |
|
From: Jacques B. <jac...@gm...> - 2003-12-01 08:54:14
|
Hi there Leif. I want to know another thing. I have a java app that runs unattended and that needs to do a self update to the latest version completely independently, without any user intervention. The app periodically checks for a new version, and if it finds it, downloads the new jar file. But the thing is that the app obviously can't update itself. I want to know if it is possible to use the wrapper in some way to copy the new jar over the old one before starting up the VM again. So in that way I would be able to write an "New Update Available..." message to the console and catch that with a wrapper filter trigger to restart the VM. Any thoughts or suggestions on how to do this? Thanx, Jacques |
|
From: Leif M. <le...@ta...> - 2003-12-01 11:57:00
|
Jacques,
You should be able to download the new jars and place them in the
correct directory.
That should be doable without the Wrapper. (You may have problems with
the IBM JVM?
because it locks the files? This is from memory, so it may be wrong :-/)
Anyway, once you have the new jar files in place, all you need to do
is trigger the
Wrapper to restart the JVM. You could do that using a filter as you
specified or
you could simply call WrapperManager.restart(). I would suggest the
later as it does
not require anything in the wrapper.conf file.
Cheers,
Leif
Jacques Bosch wrote:
>Hi there Leif.
>
>I want to know another thing.
>
>I have a java app that runs unattended and that needs to do a self update to
>the latest version completely independently, without any user intervention.
>The app periodically checks for a new version, and if it finds it, downloads
>the new jar file. But the thing is that the app obviously can't update
>itself.
>I want to know if it is possible to use the wrapper in some way to copy the
>new jar over the old one before starting up the VM again.
>So in that way I would be able to write an "New Update Available..." message
>to the console and catch that with a wrapper filter trigger to restart the
>VM.
>
>Any thoughts or suggestions on how to do this?
>
>Thanx, Jacques
>
>
|
|
From: Jacques B. <jac...@gm...> - 2003-12-01 12:25:19
|
Leif. The app is deployed with the Sun JVM and it also locks the jars. So my problem is that I cannot replace the old jar file with the new one while the VM is still running. Jacques ----- Original Message ----- From: "Leif Mortenson" <le...@ta...> To: <wra...@li...> Sent: Monday, December 01, 2003 1:56 PM Subject: Re: [Wrapper-user] Restart VM : Jacques, : You should be able to download the new jars and place them in the : correct directory. : That should be doable without the Wrapper. (You may have problems with : the IBM JVM? : because it locks the files? This is from memory, so it may be wrong :-/) : : Anyway, once you have the new jar files in place, all you need to do : is trigger the : Wrapper to restart the JVM. You could do that using a filter as you : specified or : you could simply call WrapperManager.restart(). I would suggest the : later as it does : not require anything in the wrapper.conf file. : : Cheers, : Leif : : Jacques Bosch wrote: : : >Hi there Leif. : > : >I want to know another thing. : > : >I have a java app that runs unattended and that needs to do a self update to : >the latest version completely independently, without any user intervention. : >The app periodically checks for a new version, and if it finds it, downloads : >the new jar file. But the thing is that the app obviously can't update : >itself. : >I want to know if it is possible to use the wrapper in some way to copy the : >new jar over the old one before starting up the VM again. : >So in that way I would be able to write an "New Update Available..." message : >to the console and catch that with a wrapper filter trigger to restart the : >VM. : > : >Any thoughts or suggestions on how to do this? : > : >Thanx, Jacques : > : > : : : : : ------------------------------------------------------- : This SF.net email is sponsored by: SF.net Giveback Program. : Does SourceForge.net help you be more productive? Does it : help you create better code? SHARE THE LOVE, and help us help : YOU! Click Here: http://sourceforge.net/donate/ : _______________________________________________ : Wrapper-user mailing list : Wra...@li... : https://lists.sourceforge.net/lists/listinfo/wrapper-user : : : |
|
From: Leif M. <le...@ta...> - 2003-12-01 13:07:44
|
Jacques,
In that case, you may have to play with class loaders. You will
have a bootstrap
class whose job is to look in a upgrade directory when it first starts.
If there are any new
jars, they are moved into the current jars dir. The bootstrap class
then actually calls the
real main method of your application.
I don't think the jars will be locked until after they are actually
accessed. So as long as
your bootstrap class is in its own stable and independent jar then this
should work. If not
then you will have to have your bootstrap class create a new class
loader, which in turn
builds up a classpath and so on. Classloaders can be a bit of a pain,
so hopefully the first
option will work.
Be sure to post back with the results.
Cheers,
Leif
Jacques Bosch wrote:
>Leif. The app is deployed with the Sun JVM and it also locks the jars. So my
>problem is that I cannot replace the old jar file with the new one while the
>VM is still running.
>
>
|
|
From: whack er <wha...@ya...> - 2003-12-02 05:12:06
|
Dear all I just did not want the console to be around while running on Windows XP and also did not want the wrapper to run as a service. Using Leif's reply on the list stating that a seperate executable had to be made, I have done the following: Compiled the c sources to create a Wrapper.exe that uses WinMain as the entry point rather than main. I have hardcoded the command line argument part for now and I will change this to read the WinMain cmdline when I have the time, may be some small modifications to run a GUI console (for debugging use). As of now my Wrapper works fine on Windows XP as a Windows application (no console window). I will post to the list if anything major comes up. USE THIS INFORMATION AT YOUR OWN RISK. TIA --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now |
|
From: whack er <wha...@ya...> - 2003-12-02 13:21:59
|
I just found that the Wrapper does not actually exit after the Java GUI is closed. I have now added a PostQuitMessage(0); call at the end of WinMain annd now the wrapper does not run after the app exit. whack er <wha...@ya...> wrote: Dear all I just did not want the console to be around while running on Windows XP and also did not want the wrapper to run as a service. Using Leif's reply on the list stating that a seperate executable had to be made, I have done the following: Compiled the c sources to create a Wrapper.exe that uses WinMain as the entry point rather than main. I have hardcoded the command line argument part for now and I will change this to read the WinMain cmdline when I have the time, may be some small modifications to run a GUI console (for debugging use). As of now my Wrapper works fine on Windows XP as a Windows application (no console window). I will post to the list if anything major comes up. USE THIS INFORMATION AT YOUR OWN RISK. TIA --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now |
|
From: Jacques B. <jac...@gm...> - 2003-12-09 07:07:24
|
Hi there Leif. I have managed to come right with writing a bootstrap class that first copies the update if there is one and then starts up the main app. It works beautifully. Thanx for the suggestion. This is probably the wrong place to be asking, but do you know if it is possible to unload the main app again without terminating the VM. I.e.The bootstrap class must still be loaded. What happens now, when using the wrapper: The app downloads the new jar, puts it in Updates folder, and signals for the wrapper to restart the VM. Wrapper restarts the VM starting with the bootstrap class, that then copies the update and starts up the app. But now I would love to have the same functionality even when the wrapper isn't used. I.e. The app, that was loaded with the bootstrap, downloads the new jar, and then some how indicates to the bootstrat that there is an update. The bootstrap unloads the app, removing the VM's lock on the file, copies the update, and starts the app up once more. Do you know if this is possible? Thanx for your help. Jacques ----- Original Message ----- From: "Leif Mortenson" <le...@ta...> To: <wra...@li...> Sent: Monday, December 01, 2003 3:07 PM Subject: Re: [Wrapper-user] Restart VM : Jacques, : In that case, you may have to play with class loaders. You will : have a bootstrap : class whose job is to look in a upgrade directory when it first starts. : If there are any new : jars, they are moved into the current jars dir. The bootstrap class : then actually calls the : real main method of your application. : : I don't think the jars will be locked until after they are actually : accessed. So as long as : your bootstrap class is in its own stable and independent jar then this : should work. If not : then you will have to have your bootstrap class create a new class : loader, which in turn : builds up a classpath and so on. Classloaders can be a bit of a pain, : so hopefully the first : option will work. : : Be sure to post back with the results. : : Cheers, : Leif : : Jacques Bosch wrote: : : >Leif. The app is deployed with the Sun JVM and it also locks the jars. So my : >problem is that I cannot replace the old jar file with the new one while the : >VM is still running. : > : > : : : : : ------------------------------------------------------- : This SF.net email is sponsored by: SF.net Giveback Program. : Does SourceForge.net help you be more productive? Does it : help you create better code? SHARE THE LOVE, and help us help : YOU! Click Here: http://sourceforge.net/donate/ : _______________________________________________ : Wrapper-user mailing list : Wra...@li... : https://lists.sourceforge.net/lists/listinfo/wrapper-user : : : |
|
From: Leif M. <le...@ta...> - 2003-12-09 12:58:24
|
Jacques,
Of course simply restarting the JVM using the JVM would be the
easiest :-) But what
you asking is possible. I can't walk you through all of the steps. But
the basic idea is to
create a new class loader which loads your application. The class
loader works just like
any other object. When all of its references are gone it can be garbage
collected along
with any classes that it loaded.
You would then repeat the process for your new invocation.
Applications like Tomcat do this to make it possible to reload JSP
pages when
they have been modified.
The difference between Tomcat and your application is that with
Tomcat, it is relatively
easy to know when it is safe to GC a particular classloader. All
threads that call into that
code and all references are controlled by Tomcat.
Your application will most likely be launching several threads and
maybe even using
something like swing. Even you remove all reverence to the class
loader yourself, it
will not be Gced if even a single thread someplace is still referencing
any class or object
that was loaded with that class loader.
Also remember that if you load class A in two different class
loaders they will not be
the same class even though they have the same name. Ie you can not
cast an instance
of one to the other. The only way to reference an object in another
class loader is by
using a class that was loaded from the same place. This will be true
with most of the
core java classes.
If you feeling brave, a good place to start would be with the
java.net.URLClassLoader.
I have written applications that make use of multiple classloaders.
They can be quite
useful if really needed, but you will be surprised by all the little
issues that will come up.
Cheers and Good luck.
Leif
Jacques Bosch wrote:
>Hi there Leif.
>I have managed to come right with writing a bootstrap class that first
>copies the update if there is one and then starts up the main app. It works
>beautifully. Thanx for the suggestion.
>This is probably the wrong place to be asking, but do you know if it is
>possible to unload the main app again without terminating the VM. I.e.The
>bootstrap class must still be loaded.
>What happens now, when using the wrapper: The app downloads the new jar,
>puts it in Updates folder, and signals for the wrapper to restart the VM.
>Wrapper restarts the VM starting with the bootstrap class, that then copies
>the update and starts up the app.
>But now I would love to have the same functionality even when the wrapper
>isn't used. I.e. The app, that was loaded with the bootstrap, downloads the
>new jar, and then some how indicates to the bootstrat that there is an
>update. The bootstrap unloads the app, removing the VM's lock on the file,
>copies the update, and starts the app up once more.
>
>Do you know if this is possible?
>
>Thanx for your help.
>Jacques
>
>
>----- Original Message -----
>From: "Leif Mortenson" <le...@ta...>
>To: <wra...@li...>
>Sent: Monday, December 01, 2003 3:07 PM
>Subject: Re: [Wrapper-user] Restart VM
>
>
>: Jacques,
>: In that case, you may have to play with class loaders. You will
>: have a bootstrap
>: class whose job is to look in a upgrade directory when it first starts.
>: If there are any new
>: jars, they are moved into the current jars dir. The bootstrap class
>: then actually calls the
>: real main method of your application.
>:
>: I don't think the jars will be locked until after they are actually
>: accessed. So as long as
>: your bootstrap class is in its own stable and independent jar then this
>: should work. If not
>: then you will have to have your bootstrap class create a new class
>: loader, which in turn
>: builds up a classpath and so on. Classloaders can be a bit of a pain,
>: so hopefully the first
>: option will work.
>:
>: Be sure to post back with the results.
>:
>: Cheers,
>: Leif
>:
>: Jacques Bosch wrote:
>:
>: >Leif. The app is deployed with the Sun JVM and it also locks the jars. So
>my
>: >problem is that I cannot replace the old jar file with the new one while
>the
>: >VM is still running.
>: >
>: >
>:
>:
>:
>:
>: -------------------------------------------------------
>: This SF.net email is sponsored by: SF.net Giveback Program.
>: Does SourceForge.net help you be more productive? Does it
>: help you create better code? SHARE THE LOVE, and help us help
>: YOU! Click Here: http://sourceforge.net/donate/
>: _______________________________________________
>: Wrapper-user mailing list
>: Wra...@li...
>: https://lists.sourceforge.net/lists/listinfo/wrapper-user
>:
>:
>:
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IBM Linux Tutorials.
>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|
|
From: Jacques B. <jac...@gm...> - 2003-12-09 13:26:41
|
Leif. >Of course simply restarting the JVM using the JVM would be the easiest. True, but does that have to be done manually, or by an external app like the wrapper only, or can I request the JVM to restart itself from within my app? The app must run completely unattended and also update itself unattended. Thanx for your other tips. java.net.URLClassLoader is what I used for my bootstrap class already. Jacques ----- Original Message ----- From: "Leif Mortenson" <le...@ta...> To: <wra...@li...> Sent: Tuesday, December 09, 2003 2:58 PM Subject: Re: [Wrapper-user] Restart VM : Jacques, : Of course simply restarting the JVM using the JVM would be the : easiest :-) But what : you asking is possible. I can't walk you through all of the steps. But : the basic idea is to : create a new class loader which loads your application. The class : loader works just like : any other object. When all of its references are gone it can be garbage : collected along : with any classes that it loaded. : : You would then repeat the process for your new invocation. : : Applications like Tomcat do this to make it possible to reload JSP : pages when : they have been modified. : : The difference between Tomcat and your application is that with : Tomcat, it is relatively : easy to know when it is safe to GC a particular classloader. All : threads that call into that : code and all references are controlled by Tomcat. : : Your application will most likely be launching several threads and : maybe even using : something like swing. Even you remove all reverence to the class : loader yourself, it : will not be Gced if even a single thread someplace is still referencing : any class or object : that was loaded with that class loader. : : Also remember that if you load class A in two different class : loaders they will not be : the same class even though they have the same name. Ie you can not : cast an instance : of one to the other. The only way to reference an object in another : class loader is by : using a class that was loaded from the same place. This will be true : with most of the : core java classes. : : If you feeling brave, a good place to start would be with the : java.net.URLClassLoader. : I have written applications that make use of multiple classloaders. : They can be quite : useful if really needed, but you will be surprised by all the little : issues that will come up. : : Cheers and Good luck. : Leif : : Jacques Bosch wrote: : : >Hi there Leif. : >I have managed to come right with writing a bootstrap class that first : >copies the update if there is one and then starts up the main app. It works : >beautifully. Thanx for the suggestion. : >This is probably the wrong place to be asking, but do you know if it is : >possible to unload the main app again without terminating the VM. I.e.The : >bootstrap class must still be loaded. : >What happens now, when using the wrapper: The app downloads the new jar, : >puts it in Updates folder, and signals for the wrapper to restart the VM. : >Wrapper restarts the VM starting with the bootstrap class, that then copies : >the update and starts up the app. : >But now I would love to have the same functionality even when the wrapper : >isn't used. I.e. The app, that was loaded with the bootstrap, downloads the : >new jar, and then some how indicates to the bootstrat that there is an : >update. The bootstrap unloads the app, removing the VM's lock on the file, : >copies the update, and starts the app up once more. : > : >Do you know if this is possible? : > : >Thanx for your help. : >Jacques : > : > : >----- Original Message ----- : >From: "Leif Mortenson" <le...@ta...> : >To: <wra...@li...> : >Sent: Monday, December 01, 2003 3:07 PM : >Subject: Re: [Wrapper-user] Restart VM : > : > : >: Jacques, : >: In that case, you may have to play with class loaders. You will : >: have a bootstrap : >: class whose job is to look in a upgrade directory when it first starts. : >: If there are any new : >: jars, they are moved into the current jars dir. The bootstrap class : >: then actually calls the : >: real main method of your application. : >: : >: I don't think the jars will be locked until after they are actually : >: accessed. So as long as : >: your bootstrap class is in its own stable and independent jar then this : >: should work. If not : >: then you will have to have your bootstrap class create a new class : >: loader, which in turn : >: builds up a classpath and so on. Classloaders can be a bit of a pain, : >: so hopefully the first : >: option will work. : >: : >: Be sure to post back with the results. : >: : >: Cheers, : >: Leif : >: : >: Jacques Bosch wrote: : >: : >: >Leif. The app is deployed with the Sun JVM and it also locks the jars. So : >my : >: >problem is that I cannot replace the old jar file with the new one while : >the : >: >VM is still running. : >: > : >: > : >: : >: : >: : >: : >: ------------------------------------------------------- : >: This SF.net email is sponsored by: SF.net Giveback Program. : >: Does SourceForge.net help you be more productive? Does it : >: help you create better code? SHARE THE LOVE, and help us help : >: YOU! Click Here: http://sourceforge.net/donate/ : >: _______________________________________________ : >: Wrapper-user mailing list : >: Wra...@li... : >: https://lists.sourceforge.net/lists/listinfo/wrapper-user : >: : >: : >: : > : > : > : >------------------------------------------------------- : >This SF.net email is sponsored by: IBM Linux Tutorials. : >Become an expert in LINUX or just sharpen your skills. Sign up for IBM's : >Free Linux Tutorials. Learn everything from the bash shell to sys admin. : >Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click : >_______________________________________________ : >Wrapper-user mailing list : >Wra...@li... : >https://lists.sourceforge.net/lists/listinfo/wrapper-user : > : > : > : : : : : ------------------------------------------------------- : This SF.net email is sponsored by: IBM Linux Tutorials. : Become an expert in LINUX or just sharpen your skills. Sign up for IBM's : Free Linux Tutorials. Learn everything from the bash shell to sys admin. : Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click : _______________________________________________ : Wrapper-user mailing list : Wra...@li... : https://lists.sourceforge.net/lists/listinfo/wrapper-user : : : |
|
From: Leif M. <le...@ta...> - 2003-12-01 12:02:45
|
Jacques, >What is the environment variable to add the win/system32 folder to the >wrapper.java.library.path? > > Try the following: wrapper.java.library.path.1=../lib wrapper.java.library.path.2=%WINDIR%/system32 >Where can I get a list of the environment variables. Couldn't find it in the >docs. > > The wrapper does not provide a way to do this directly. If you are running a console then you can simply type "set" at the command prompt and you will get a full dump of all defined environment variables. That is how I answered your first question. This will not help when running as a service however. You currently have to look in the control panel. Cheers, Leif |
|
From: Jacques B. <jac...@gm...> - 2003-12-01 12:40:39
|
Thank you. That worked perfectly! Jacques ----- Original Message ----- From: "Leif Mortenson" <le...@ta...> To: <wra...@li...> Sent: Monday, December 01, 2003 2:02 PM Subject: Re: [Wrapper-user] SYS32 in wrapper.java.library.path : Jacques, : : >What is the environment variable to add the win/system32 folder to the : >wrapper.java.library.path? : > : > : Try the following: : wrapper.java.library.path.1=../lib : wrapper.java.library.path.2=%WINDIR%/system32 : : >Where can I get a list of the environment variables. Couldn't find it in the : >docs. : > : > : The wrapper does not provide a way to do this directly. If you are : running a console then : you can simply type "set" at the command prompt and you will get a full : dump of all : defined environment variables. That is how I answered your first : question. This will not : help when running as a service however. You currently have to look in : the control panel. : : Cheers, : Leif : : : : : ------------------------------------------------------- : This SF.net email is sponsored by: SF.net Giveback Program. : Does SourceForge.net help you be more productive? Does it : help you create better code? SHARE THE LOVE, and help us help : YOU! Click Here: http://sourceforge.net/donate/ : _______________________________________________ : Wrapper-user mailing list : Wra...@li... : https://lists.sourceforge.net/lists/listinfo/wrapper-user : : : |