dcsimg
Call main function in a jar file and prevent System.exit(0) being called?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Robert_Smith
Posted On:   Tuesday, August 20, 2002 01:49 PM

Hi,

I've been given a jar file to work with, but have no source code or API docs. The jar normally takes input from the command line. I'm accessing it from within my app by passing a String array to the main(String[]) function of the Main class. The trouble is, I wish to call this function a number of times before quitting my app. The app quits after one call, I guess because the main function completes and returns 0 or calls System.exit(0). Does anyone know of a way round this?

Thanks,

Rob

Re: Call main function in a jar file and prevent System.exit(0) being called?

Posted By:   Debabrata_Dash  
Posted On:   Tuesday, August 20, 2002 04:15 PM

The only way I can think of is to install a security manager just before calling the jar file and prevent the jar file call System.exit.


-Dash.

About | Sitemap | Contact