Gerbrand van Dieijen wrote:I'm not entirely sure about your problem. Do you have a java application, that is executed by running a class with a main method? The JVM will then be terminated when the main method exists and there's no other (non deamon) thread running.
To clarify: if you open a Swing or AWT window, there will always be an extra running thread, as Swing or AWT will spawn one seperate thread (to handle events and do graphic updates).
If your program exists, this is probably because it has finished doing everything it has to do.
Ulf Dittmer wrote:You need to turn that application into a system service, instead of running it as a user-level application. Searching for "java application as a service" or similar will find solutions to this.
Amardeep Salkar wrote:
Ulf Dittmer wrote:You need to turn that application into a system service, instead of running it as a user-level application. Searching for "java application as a service" or similar will find solutions to this.
Dear Ulf Dittmer,
Please let me know how to do that? I really need it.
Regards,
Amardeep
Ulf Dittmer wrote:Some of those solutions are open source -like Java Service Wrapper-, so you can analyze what they do. You may also want to read up on what a "Windows Service" is and a "Unix cron job".
Amardeep Salkar wrote:
Gerbrand van Dieijen wrote:I'm not entirely sure about your problem. Do you have a java application, that is executed by running a class with a main method? The JVM will then be terminated when the main method exists and there's no other (non deamon) thread running.
To clarify: if you open a Swing or AWT window, there will always be an extra running thread, as Swing or AWT will spawn one seperate thread (to handle events and do graphic updates).
If your program exists, this is probably because it has finished doing everything it has to do.
Dear Gerbrand,
I've one Application which contain java main i.e. p.s.v.main() that I've made one executable jar file through Jar2Exe. and when I run that Application it is running fine, also I'm able to task manager that application is running using my computer name. but when I log off from my account, that process is also killed. I don't want that. What I want that process will run if I logged off.
Hope, you may me out of this issue.
Regards,
Amardeep
Gerbrand van Dieijen wrote:
Amardeep Salkar wrote:
Gerbrand van Dieijen wrote:I'm not entirely sure about your problem. Do you have a java application, that is executed by running a class with a main method? The JVM will then be terminated when the main method exists and there's no other (non deamon) thread running.
To clarify: if you open a Swing or AWT window, there will always be an extra running thread, as Swing or AWT will spawn one seperate thread (to handle events and do graphic updates).
If your program exists, this is probably because it has finished doing everything it has to do.
Dear Gerbrand,
I've one Application which contain java main i.e. p.s.v.main() that I've made one executable jar file through Jar2Exe. and when I run that Application it is running fine, also I'm able to task manager that application is running using my computer name. but when I log off from my account, that process is also killed. I don't want that. What I want that process will run if I logged off.
Hope, you may me out of this issue.
Regards,
Amardeep
By Logging off, do you mean logging off Windows ? In that case, as told in the other postings, you have to install your application as a windows service. Creating a windows service is not as hard as it may seem.
See Google for a start:
http://www.google.nl/search?q=install+java+service
Basically, the java application is wrapped and then available as a service. That service will become active when Windows starts (not when you login). You'll be able to see an overview of currently installed services at:
Configuration screen, Administrative Tools, Services.