author | hseigel |
Thu, 17 Jan 2013 10:25:16 -0500 | |
changeset 15228 | e92acc84ade3 |
parent 7410 | f5b282e7a7a6 |
permissions | -rw-r--r-- |
7410 | 1 |
/* |
15228
e92acc84ade3
7102489: RFE: cleanup jlong typedef on __APPLE__and _LLP64 systems.
hseigel
parents:
7410
diff
changeset
|
2 |
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
7410 | 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 |
*/ |
|
24 |
||
25 |
||
26 |
#ifndef _JAVA_H_ |
|
27 |
#define _JAVA_H_ |
|
28 |
||
29 |
/* |
|
30 |
* Get system specific defines. |
|
31 |
*/ |
|
32 |
#include "jni.h" |
|
33 |
#include "java_md.h" |
|
34 |
#include "jli_util.h" |
|
35 |
||
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); |
|
41 |
||
42 |
typedef struct { |
|
43 |
CreateJavaVM_t CreateJavaVM; |
|
44 |
GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs; |
|
45 |
} InvocationFunctions; |
|
46 |
||
47 |
/* |
|
48 |
* Prototypes for launcher functions in the system specific java_md.c. |
|
49 |
*/ |
|
50 |
||
51 |
jboolean |
|
52 |
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn); |
|
53 |
||
54 |
void |
|
55 |
GetXUsagePath(char *buf, jint bufsize); |
|
56 |
||
57 |
jboolean |
|
58 |
GetApplicationHome(char *buf, jint bufsize); |
|
59 |
||
60 |
const char * |
|
61 |
GetArch(); |
|
62 |
||
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); |
|
70 |
||
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); |
|
79 |
||
80 |
/* |
|
81 |
* Report an exception which terminates the vm to stderr or a window |
|
82 |
* as appropriate. |
|
83 |
*/ |
|
84 |
void ReportExceptionDescription(JNIEnv * env); |
|
85 |
||
86 |
jboolean RemovableMachineDependentOption(char * option); |
|
87 |
void PrintMachineDependentOptions(); |
|
88 |
||
89 |
/* |
|
90 |
* Block current thread and continue execution in new thread |
|
91 |
*/ |
|
92 |
int ContinueInNewThread(int (JNICALL *continuation)(void *), |
|
93 |
jlong stack_size, void * args); |
|
94 |
||
95 |
/* sun.java.launcher.* platform properties. */ |
|
96 |
void SetJavaLauncherPlatformProps(void); |
|
97 |
||
98 |
/* |
|
99 |
* Functions defined in java.c and used in java_md.c. |
|
100 |
*/ |
|
101 |
jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative); |
|
102 |
char *CheckJvmType(int *argc, char ***argv, jboolean speculative); |
|
103 |
void AddOption(char *str, void *info); |
|
104 |
||
105 |
/* |
|
106 |
* Make launcher spit debug output. |
|
107 |
*/ |
|
108 |
extern jboolean _launcher_debug; |
|
109 |
||
110 |
#endif /* _JAVA_H_ */ |