If I understand it correctly, you are embedding Ivy within your application and using the Main class as the starting point to embed Ivy? I don't know if the Main class is meant to be used in that way.

-Jaikiran
On Friday 17 July 2015 01:24 PM, Krzysztof Harpula wrote:
Hi, I am starting to use Ivy. I wanted to create a batch file which
launches my application using stand alone ivy launcher. I noticed that
my application starts and then immediately terminates. I checked the
sources of Ivy launcher and I van see the following piece of code:

  public static void main(String[] args) throws Exception {
         CommandLineParser parser = getParser();
         try {
             run(parser, args);
             System.exit(0);
         } catch (ParseException ex) {
             System.err.println(ex.getMessage());
             usage(parser, false);
             System.exit(1);
         }
     }

The reason of early exit of application is the call to System.exit(0).
It does not seem to make any sense here. I try to start a server
application where the main thread just starts all up and then it dies.
The rest is controlled by IO threads listening on sockets. The
application ends when last non daemon thread exits. With present
implementation of Ivy launcher, I can not use it because it effectively
kills my application. Could you please fix it?


Reply via email to