.startup will crash java program when supplying parameters
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Carl_Przybylek
Posted On:   Thursday, June 3, 2004 02:13 PM

Running a java program from the .startup file could cause that program to abort and seem not to run at all. If you supply program arguments the java program will stop running. Does anyone know how to get around this? I found a cryptic answer, but Im not sure how to accomplish this. Description : This is caused by the garbage collector sweeping the args, in, out, and err from underneath the new process. Slush kicks off the new process, but those objects were created in slush's scope. Slush finishes kicking off the process, then that thread exits and those objects fall out of scope and are collected, even though the other VM has an active reference to them. Solution : Give the new process a deep copied new version of the streams.    More>>

Running a java program from the .startup file could cause that program to abort and seem not to run at all. If you supply program arguments the java program will stop running. Does anyone know how to get around this? I found a cryptic answer, but Im not sure how to accomplish this.

Description : This is caused by the garbage collector sweeping the args, in, out, and err from underneath the new process. Slush kicks off the new process, but those objects were created in slush's scope. Slush finishes kicking off the process, then that thread exits and those objects fall out of scope and are collected, even though the other VM has an active reference to them.

Solution : Give the new process a deep copied new version of the streams.

   <<Less
About | Sitemap | Contact