src/share/tools/launcher/java.h

Thu, 02 Dec 2010 05:45:54 -0800

author
sla
date
Thu, 02 Dec 2010 05:45:54 -0800
changeset 2327
cb2d0a362639
child 4465
203f64878aab
permissions
-rw-r--r--

6981484: Update development launcher
Summary: Add new development launcher called hotspot(.exe)
Reviewed-by: coleenp

     1 /*
     2  * Copyright (c) 1999, 2010, 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.
     8  *
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12  * version 2 for more details (a copy is included in the LICENSE file that
    13  * accompanied this code).
    14  *
    15  * You should have received a copy of the GNU General Public License version
    16  * 2 along with this work; if not, write to the Free Software Foundation,
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18  *
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    22  *
    23  */
    26 #ifndef _JAVA_H_
    27 #define _JAVA_H_
    29 /*
    30  * Get system specific defines.
    31  */
    32 #include "jni.h"
    33 #include "java_md.h"
    34 #include "jli_util.h"
    36 /*
    37  * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
    38  */
    39 typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
    40 typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
    42 typedef struct {
    43     CreateJavaVM_t CreateJavaVM;
    44     GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
    45 } InvocationFunctions;
    47 /*
    48  * Prototypes for launcher functions in the system specific java_md.c.
    49  */
    51 jboolean
    52 LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
    54 void
    55 GetXUsagePath(char *buf, jint bufsize);
    57 jboolean
    58 GetApplicationHome(char *buf, jint bufsize);
    60 const char *
    61 GetArch();
    63 void CreateExecutionEnvironment(int *_argc,
    64                                        char ***_argv,
    65                                        char jrepath[],
    66                                        jint so_jrepath,
    67                                        char jvmpath[],
    68                                        jint so_jvmpath,
    69                                        char **original_argv);
    71 /*
    72  * Report an error message to stderr or a window as appropriate.  The
    73  * flag always is set to JNI_TRUE if message is to be reported to both
    74  * strerr and windows and set to JNI_FALSE if the message should only
    75  * be sent to a window.
    76  */
    77 void ReportErrorMessage(char * message, jboolean always);
    78 void ReportErrorMessage2(char * format, char * string, jboolean always);
    80 /*
    81  * Report an exception which terminates the vm to stderr or a window
    82  * as appropriate.
    83  */
    84 void ReportExceptionDescription(JNIEnv * env);
    86 jboolean RemovableMachineDependentOption(char * option);
    87 void PrintMachineDependentOptions();
    89 const char *jlong_format_specifier();
    90 /*
    91  * Block current thread and continue execution in new thread
    92  */
    93 int ContinueInNewThread(int (JNICALL *continuation)(void *),
    94                         jlong stack_size, void * args);
    96 /* sun.java.launcher.* platform properties. */
    97 void SetJavaLauncherPlatformProps(void);
    99 /*
   100  * Functions defined in java.c and used in java_md.c.
   101  */
   102 jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
   103 char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
   104 void AddOption(char *str, void *info);
   106 /*
   107  * Make launcher spit debug output.
   108  */
   109 extern jboolean _launcher_debug;
   111 #endif /* _JAVA_H_ */

mercurial