dcsimg
Calling Toolkit.getDefaultToolkit() will not let Java process to be backgrounded.
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eric_Murphy
Posted On:   Wednesday, October 22, 2003 02:40 PM

I am using Solaris 5.8. I can basically do 'java Yada &' and logout with the process still running.

However, when I change the code to include Toolkit.getDefaultToolkit() (to simulate a GUI loading) the process will die when I log out. I want this process to keep running.

I think this has something to do with the Toolkit using the X-Windows libraries, etc. Maybe there is some way I can unload the Toolkit, I don't know.

Re: Calling Toolkit.getDefaultToolkit() will not let Java process to be backgrounded.

Posted By:   Eric_Murphy  
Posted On:   Thursday, October 23, 2003 11:48 AM

I have done more research and realized that losing my Xsession process is what seems to be the culprit. Obviously logging out requires losing my Xsession process, otherwise it wouldn't really be logging out.

My stuff needs to keep running without an Xsession, and with new Xsessions that might be spawned.

Re: Calling Toolkit.getDefaultToolkit() will not let Java process to be backgrounded.

Posted By:   Eric_Murphy  
Posted On:   Thursday, October 23, 2003 11:48 AM

I have done more research and realized that losing my Xsession process is what seems to be the culprit. Obviously logging out requires losing my Xsession process, otherwise it wouldn't really be logging out.

My stuff needs to keep running without an Xsession, and with new Xsessions that might be spawned.

Re: Calling Toolkit.getDefaultToolkit() will not let Java process to be backgrounded.

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, October 22, 2003 04:45 PM

I think you are right, that your use of the Toolkit is the problem.

Re: Calling Toolkit.getDefaultToolkit() will not let Java process to be backgrounded.

Posted By:   Bahman_Barzideh  
Posted On:   Wednesday, October 22, 2003 03:26 PM

From what I remember of UNIX, if you want your process to live beyond
the parent (your login shell) you should nohup it. Try

nohup java Yada &
About | Sitemap | Contact