< prev index next >

src/macosx/bin/java_md_macosx.c

Print this page
rev 11229 : 8068033: JNI exception pending in jdk/src/share/bin/java.c
Reviewed-by: mchung, serb
   1 /*
   2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1051             JavaLaunchHelper* launcher = [[[JavaLaunchHelper alloc] init] autorelease];
1052             [launcher performSelectorOnMainThread:@selector(launchJava:)
1053                                        withObject:[NSValue valueWithPointer:(void*)&args]
1054                                     waitUntilDone:YES];
1055             rslt = [launcher getReturnValue];
1056         }
1057         [pool drain];
1058         return rslt;
1059     } else {
1060         return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
1061     }
1062 }
1063 
1064 /*
1065  * Note the jvmInstance must be initialized first before entering into
1066  * ShowSplashScreen, as there is a callback into the JLI_GetJavaVMInstance.
1067  */
1068 void PostJVMInit(JNIEnv *env, jstring mainClass, JavaVM *vm) {
1069     jvmInstance = vm;
1070     SetMainClassForAWT(env, mainClass);

1071     ShowSplashScreen();
1072 }
1073 
1074 jboolean
1075 ProcessPlatformOption(const char* arg)
1076 {
1077     if (JLI_StrCmp(arg, "-XstartOnFirstThread") == 0) {
1078        SetXStartOnFirstThreadArg();
1079        return JNI_TRUE;
1080     } else if (JLI_StrCCmp(arg, "-Xdock:") == 0) {
1081        SetXDockArgForAWT(arg);
1082        return JNI_TRUE;
1083     }
1084     // arguments we know not
1085     return JNI_FALSE;
1086 }
   1 /*
   2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


1051             JavaLaunchHelper* launcher = [[[JavaLaunchHelper alloc] init] autorelease];
1052             [launcher performSelectorOnMainThread:@selector(launchJava:)
1053                                        withObject:[NSValue valueWithPointer:(void*)&args]
1054                                     waitUntilDone:YES];
1055             rslt = [launcher getReturnValue];
1056         }
1057         [pool drain];
1058         return rslt;
1059     } else {
1060         return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
1061     }
1062 }
1063 
1064 /*
1065  * Note the jvmInstance must be initialized first before entering into
1066  * ShowSplashScreen, as there is a callback into the JLI_GetJavaVMInstance.
1067  */
1068 void PostJVMInit(JNIEnv *env, jstring mainClass, JavaVM *vm) {
1069     jvmInstance = vm;
1070     SetMainClassForAWT(env, mainClass);
1071     CHECK_EXCEPTION_RETURN();
1072     ShowSplashScreen();
1073 }
1074 
1075 jboolean
1076 ProcessPlatformOption(const char* arg)
1077 {
1078     if (JLI_StrCmp(arg, "-XstartOnFirstThread") == 0) {
1079        SetXStartOnFirstThreadArg();
1080        return JNI_TRUE;
1081     } else if (JLI_StrCCmp(arg, "-Xdock:") == 0) {
1082        SetXDockArgForAWT(arg);
1083        return JNI_TRUE;
1084     }
1085     // arguments we know not
1086     return JNI_FALSE;
1087 }
< prev index next >