annotate src/os/solaris/launcher/java.h @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children f008d3631bd1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
26 * Gamma (Hotspot internal engineering test) launcher based on 1.6.0-b28 JDK,
a61af66fc99e Initial load
duke
parents:
diff changeset
27 * search "GAMMA" for gamma specific changes.
a61af66fc99e Initial load
duke
parents:
diff changeset
28 */
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 #ifndef _JAVA_H_
a61af66fc99e Initial load
duke
parents:
diff changeset
31 #define _JAVA_H_
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
34 * Get system specific defines.
a61af66fc99e Initial load
duke
parents:
diff changeset
35 */
a61af66fc99e Initial load
duke
parents:
diff changeset
36 #include "jni.h"
a61af66fc99e Initial load
duke
parents:
diff changeset
37 #include "java_md.h"
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
40 * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
a61af66fc99e Initial load
duke
parents:
diff changeset
41 */
a61af66fc99e Initial load
duke
parents:
diff changeset
42 typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
a61af66fc99e Initial load
duke
parents:
diff changeset
43 typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 typedef struct {
a61af66fc99e Initial load
duke
parents:
diff changeset
46 CreateJavaVM_t CreateJavaVM;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 } InvocationFunctions;
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
51 * Prototypes for launcher functions in the system specific java_md.c.
a61af66fc99e Initial load
duke
parents:
diff changeset
52 */
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 jboolean
a61af66fc99e Initial load
duke
parents:
diff changeset
55 LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 void
a61af66fc99e Initial load
duke
parents:
diff changeset
58 GetXUsagePath(char *buf, jint bufsize);
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 jboolean
a61af66fc99e Initial load
duke
parents:
diff changeset
61 GetApplicationHome(char *buf, jint bufsize);
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 const char *
a61af66fc99e Initial load
duke
parents:
diff changeset
64 GetArch();
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 void CreateExecutionEnvironment(int *_argc,
a61af66fc99e Initial load
duke
parents:
diff changeset
67 char ***_argv,
a61af66fc99e Initial load
duke
parents:
diff changeset
68 char jrepath[],
a61af66fc99e Initial load
duke
parents:
diff changeset
69 jint so_jrepath,
a61af66fc99e Initial load
duke
parents:
diff changeset
70 char jvmpath[],
a61af66fc99e Initial load
duke
parents:
diff changeset
71 jint so_jvmpath,
a61af66fc99e Initial load
duke
parents:
diff changeset
72 char **original_argv);
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
75 * Report an error message to stderr or a window as appropriate. The
a61af66fc99e Initial load
duke
parents:
diff changeset
76 * flag always is set to JNI_TRUE if message is to be reported to both
a61af66fc99e Initial load
duke
parents:
diff changeset
77 * strerr and windows and set to JNI_FALSE if the message should only
a61af66fc99e Initial load
duke
parents:
diff changeset
78 * be sent to a window.
a61af66fc99e Initial load
duke
parents:
diff changeset
79 */
a61af66fc99e Initial load
duke
parents:
diff changeset
80 void ReportErrorMessage(char * message, jboolean always);
a61af66fc99e Initial load
duke
parents:
diff changeset
81 void ReportErrorMessage2(char * format, char * string, jboolean always);
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
84 * Report an exception which terminates the vm to stderr or a window
a61af66fc99e Initial load
duke
parents:
diff changeset
85 * as appropriate.
a61af66fc99e Initial load
duke
parents:
diff changeset
86 */
a61af66fc99e Initial load
duke
parents:
diff changeset
87 void ReportExceptionDescription(JNIEnv * env);
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 jboolean RemovableMachineDependentOption(char * option);
a61af66fc99e Initial load
duke
parents:
diff changeset
90 void PrintMachineDependentOptions();
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
93 * Functions defined in java.c and used in java_md.c.
a61af66fc99e Initial load
duke
parents:
diff changeset
94 */
a61af66fc99e Initial load
duke
parents:
diff changeset
95 jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
a61af66fc99e Initial load
duke
parents:
diff changeset
96 char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
a61af66fc99e Initial load
duke
parents:
diff changeset
97 void* MemAlloc(size_t size);
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
100 * Make launcher spit debug output.
a61af66fc99e Initial load
duke
parents:
diff changeset
101 */
a61af66fc99e Initial load
duke
parents:
diff changeset
102 extern jboolean _launcher_debug;
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 #endif /* _JAVA_H_ */