< prev index next >

src/java.base/share/native/libjli/java.c

Print this page
rev 56298 : 8231171: remove remaining sun.java.launcher.pid references


 321     }
 322 
 323     /* Parse command line options; if the return value of
 324      * ParseArguments is false, the program should exit.
 325      */
 326     if (!ParseArguments(&argc, &argv, &mode, &what, &ret, jrepath)) {
 327         return(ret);
 328     }
 329 
 330     /* Override class path if -jar flag was specified */
 331     if (mode == LM_JAR) {
 332         SetClassPath(what);     /* Override class path */
 333     }
 334 
 335     /* set the -Dsun.java.command pseudo property */
 336     SetJavaCommandLineProp(what, argc, argv);
 337 
 338     /* Set the -Dsun.java.launcher pseudo property */
 339     SetJavaLauncherProp();
 340 
 341     /* set the -Dsun.java.launcher.* platform properties */
 342     SetJavaLauncherPlatformProps();
 343 
 344     return JVMInit(&ifn, threadStackSize, argc, argv, mode, what, ret);
 345 }
 346 /*
 347  * Always detach the main thread so that it appears to have ended when
 348  * the application's main method exits.  This will invoke the
 349  * uncaught exception handler machinery if main threw an
 350  * exception.  An uncaught exception handler cannot change the
 351  * launcher's return code except by calling System.exit.
 352  *
 353  * Wait for all non-daemon threads to end, then destroy the VM.
 354  * This will actually create a trivial new Java waiter thread
 355  * named "DestroyJavaVM", but this will be seen as a different
 356  * thread from the one that executed main, even though they are
 357  * the same C thread.  This allows mainThread.join() and
 358  * mainThread.isAlive() to work as expected.
 359  */
 360 #define LEAVE() \
 361     do { \
 362         if ((*vm)->DetachCurrentThread(vm) != JNI_OK) { \
 363             JLI_ReportErrorMessage(JVM_ERROR2); \




 321     }
 322 
 323     /* Parse command line options; if the return value of
 324      * ParseArguments is false, the program should exit.
 325      */
 326     if (!ParseArguments(&argc, &argv, &mode, &what, &ret, jrepath)) {
 327         return(ret);
 328     }
 329 
 330     /* Override class path if -jar flag was specified */
 331     if (mode == LM_JAR) {
 332         SetClassPath(what);     /* Override class path */
 333     }
 334 
 335     /* set the -Dsun.java.command pseudo property */
 336     SetJavaCommandLineProp(what, argc, argv);
 337 
 338     /* Set the -Dsun.java.launcher pseudo property */
 339     SetJavaLauncherProp();
 340 



 341     return JVMInit(&ifn, threadStackSize, argc, argv, mode, what, ret);
 342 }
 343 /*
 344  * Always detach the main thread so that it appears to have ended when
 345  * the application's main method exits.  This will invoke the
 346  * uncaught exception handler machinery if main threw an
 347  * exception.  An uncaught exception handler cannot change the
 348  * launcher's return code except by calling System.exit.
 349  *
 350  * Wait for all non-daemon threads to end, then destroy the VM.
 351  * This will actually create a trivial new Java waiter thread
 352  * named "DestroyJavaVM", but this will be seen as a different
 353  * thread from the one that executed main, even though they are
 354  * the same C thread.  This allows mainThread.join() and
 355  * mainThread.isAlive() to work as expected.
 356  */
 357 #define LEAVE() \
 358     do { \
 359         if ((*vm)->DetachCurrentThread(vm) != JNI_OK) { \
 360             JLI_ReportErrorMessage(JVM_ERROR2); \


< prev index next >