jdk/src/java.base/share/native/libjli/java.c
changeset 28771 2885fb2e1002
parent 28107 587cd87d5c98
child 29114 a9b39a645e85
equal deleted inserted replaced
28770:b74a583c3125 28771:2885fb2e1002
     1 /*
     1 /*
     2  * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   348             ret = (CEL_return_value); \
   348             ret = (CEL_return_value); \
   349             LEAVE(); \
   349             LEAVE(); \
   350         } \
   350         } \
   351     } while (JNI_FALSE)
   351     } while (JNI_FALSE)
   352 
   352 
   353 #define CHECK_EXCEPTION_RETURN() \
       
   354     do { \
       
   355         if ((*env)->ExceptionOccurred(env)) { \
       
   356             return; \
       
   357         } \
       
   358     } while (JNI_FALSE)
       
   359 
   353 
   360 int JNICALL
   354 int JNICALL
   361 JavaMain(void * _args)
   355 JavaMain(void * _args)
   362 {
   356 {
   363     JavaMainArgs *args = (JavaMainArgs *)_args;
   357     JavaMainArgs *args = (JavaMainArgs *)_args;
   464      * both SWT and JavaFX. So we'll pass the actual application class here
   458      * both SWT and JavaFX. So we'll pass the actual application class here
   465      * instead of mainClass as that may be a launcher or helper class instead
   459      * instead of mainClass as that may be a launcher or helper class instead
   466      * of the application class.
   460      * of the application class.
   467      */
   461      */
   468     PostJVMInit(env, appClass, vm);
   462     PostJVMInit(env, appClass, vm);
       
   463     CHECK_EXCEPTION_LEAVE(1);
   469     /*
   464     /*
   470      * The LoadMainClass not only loads the main class, it will also ensure
   465      * The LoadMainClass not only loads the main class, it will also ensure
   471      * that the main method's signature is correct, therefore further checking
   466      * that the main method's signature is correct, therefore further checking
   472      * is not required. The main method is invoked here so that extraneous java
   467      * is not required. The main method is invoked here so that extraneous java
   473      * stacks are not in the application stack trace.
   468      * stacks are not in the application stack trace.