Mon, 15 Dec 2008 16:55:11 -0800
6785258: Update copyright year
Summary: Update copyright for files that have been modified starting July 2008 to Dec 2008
Reviewed-by: katleman, ohair, tbell
1 /*
2 * Copyright 1999-2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 *
23 */
25 /*
26 * Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
27 * search "GAMMA" for gamma specific changes.
28 */
30 #ifndef _JAVA_H_
31 #define _JAVA_H_
33 /*
34 * Get system specific defines.
35 */
36 #include "jni.h"
37 #include "java_md.h"
39 /*
40 * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
41 */
42 typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
43 typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
45 typedef struct {
46 CreateJavaVM_t CreateJavaVM;
47 GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
48 } InvocationFunctions;
50 /*
51 * Prototypes for launcher functions in the system specific java_md.c.
52 */
54 jboolean
55 LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
57 void
58 GetXUsagePath(char *buf, jint bufsize);
60 jboolean
61 GetApplicationHome(char *buf, jint bufsize);
63 const char *
64 GetArch();
66 void CreateExecutionEnvironment(int *_argc,
67 char ***_argv,
68 char jrepath[],
69 jint so_jrepath,
70 char jvmpath[],
71 jint so_jvmpath,
72 char **original_argv);
74 /*
75 * Report an error message to stderr or a window as appropriate. The
76 * flag always is set to JNI_TRUE if message is to be reported to both
77 * strerr and windows and set to JNI_FALSE if the message should only
78 * be sent to a window.
79 */
80 void ReportErrorMessage(char * message, jboolean always);
81 void ReportErrorMessage2(char * format, char * string, jboolean always);
83 /*
84 * Report an exception which terminates the vm to stderr or a window
85 * as appropriate.
86 */
87 void ReportExceptionDescription(JNIEnv * env);
89 jboolean RemovableMachineDependentOption(char * option);
90 void PrintMachineDependentOptions();
92 /*
93 * Functions defined in java.c and used in java_md.c.
94 */
95 jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
96 char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
97 void* MemAlloc(size_t size);
99 /*
100 * Make launcher spit debug output.
101 */
102 extern jboolean _launcher_debug;
103 /*
104 * This allows for finding classes from the VM's bootstrap class loader
105 * directly, FindClass uses the application class loader internally, this will
106 * cause unnecessary searching of the classpath for the required classes.
107 */
108 typedef jclass (JNICALL FindClassFromBootLoader_t(JNIEnv *env,
109 const char *name,
110 jboolean throwError));
112 jclass FindBootStrapClass(JNIEnv *env, const char *classname);
114 #endif /* _JAVA_H_ */