source: trunk/icedtea-web/launcher/java.h@ 404

Last change on this file since 404 was 348, checked in by dmik, 13 years ago

vendor: Add icedtea-web v1.1.2 to current.

File size: 3.6 KB
Line 
1/*
2 * Copyright (c) 1998, 2007, 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
23 * questions.
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#include <limits.h>
37
38#define CURRENT_DATA_MODEL (CHAR_BIT * sizeof(void*))
39
40/*
41 * Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
42 */
43typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
44typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
45
46typedef struct {
47 CreateJavaVM_t CreateJavaVM;
48 GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
49} InvocationFunctions;
50
51/*
52 * Prototypes for launcher functions in the system specific java_md.c.
53 */
54
55jboolean
56LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
57
58void
59GetXUsagePath(char *buf, jint bufsize);
60
61jboolean
62GetApplicationHome(char *buf, jint bufsize);
63
64const char *
65GetArch();
66
67void CreateExecutionEnvironment(int *_argc,
68 char ***_argv,
69 char jrepath[],
70 jint so_jrepath,
71 char jvmpath[],
72 jint so_jvmpath,
73 char **original_argv);
74
75/*
76 * Report an error message to stderr or a window as appropriate. The
77 * flag always is set to JNI_TRUE if message is to be reported to both
78 * strerr and windows and set to JNI_FALSE if the message should only
79 * be sent to a window.
80 */
81void ReportErrorMessage(char * message, jboolean always);
82void ReportErrorMessage2(char * format, char * string, jboolean always);
83
84/*
85 * Report an exception which terminates the vm to stderr or a window
86 * as appropriate.
87 */
88void ReportExceptionDescription(JNIEnv * env);
89
90jboolean RemovableMachineDependentOption(char * option);
91void PrintMachineDependentOptions();
92
93const char *jlong_format_specifier();
94/*
95 * Block current thread and continue execution in new thread
96 */
97int ContinueInNewThread(int (JNICALL *continuation)(void *),
98 jlong stack_size, void * args, int ret);
99
100/* sun.java.launcher.* platform properties. */
101void SetJavaLauncherPlatformProps(void);
102
103/*
104 * Functions defined in java.c and used in java_md.c.
105 */
106jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
107char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
108void AddOption(char *str, void *info);
109
110/*
111 * Make launcher spit debug output.
112 */
113extern jboolean _launcher_debug;
114
115#endif /* _JAVA_H_ */
Note: See TracBrowser for help on using the repository browser.