1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*******************************************************************************
* Copyright (c) 2006, 2009 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
#ifndef ECLIPSE_JNI_H
#define ECLIPSE_JNI_H
#include "eclipseUnicode.h"
#include <jni.h>
typedef struct {
int launchResult;
int runResult;
_TCHAR * errorMessage;
} JavaResults;
typedef jint (JNICALL *JNI_createJavaVM)(JavaVM **pvm, JNIEnv **env, void *args);
/* JNI Callback methods */
/* Use name mangling since we may be linking these from java with System.LoadLibrary */
#define set_exit_data Java_org_eclipse_equinox_launcher_JNIBridge__1set_1exit_1data
#define set_launcher_info Java_org_eclipse_equinox_launcher_JNIBridge__1set_1launcher_1info
#define update_splash Java_org_eclipse_equinox_launcher_JNIBridge__1update_1splash
#define show_splash Java_org_eclipse_equinox_launcher_JNIBridge__1show_1splash
#define get_splash_handle Java_org_eclipse_equinox_launcher_JNIBridge__1get_1splash_1handle
#define takedown_splash Java_org_eclipse_equinox_launcher_JNIBridge__1takedown_1splash
#define get_os_recommended_folder Java_org_eclipse_equinox_launcher_JNIBridge__1get_1os_1recommended_1folder
#ifdef __cplusplus
extern "C" {
#endif
/*
* org_eclipse_equinox_launcher_JNIBridge#_set_exit_data
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL set_exit_data(JNIEnv *, jobject, jstring, jstring);
/*
* org_eclipse_equinox_launcher_JNIBridge#_set_launcher_info
* Signature: (Ljava/lang/String;Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL set_launcher_info(JNIEnv *, jobject, jstring, jstring);
/*
* org_eclipse_equinox_launcher_JNIBridge#_update_splash
* Signature: ()V
*/
JNIEXPORT void JNICALL update_splash(JNIEnv *, jobject);
/*
* org_eclipse_equinox_launcher_JNIBridge#_get_splash_handle
* Signature: ()J
*/
JNIEXPORT jlong JNICALL get_splash_handle(JNIEnv *, jobject);
/*
* org_eclipse_equinox_launcher_JNIBridge#_show_splash
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL show_splash(JNIEnv *, jobject, jstring);
/*
* org_eclipse_equinox_launcher_JNIBridge#_takedown_splash
* Signature: ()V
*/
JNIEXPORT void JNICALL takedown_splash(JNIEnv *, jobject);
/*
* org_eclipse_equinox_launcher_JNIBridge#_get_os_recommended_folder
* Signature: ()Ljava/lang/String
*/
JNIEXPORT jstring JNICALL get_os_recommended_folder(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
/* Start the Java VM and Wait For It to Terminate
*
* This method is responsible for starting the Java VM and for
* detecting its termination. The resulting JVM exit code should
* be returned to the main launcher, which will display a message if
* the termination was not normal.
*/
extern JavaResults* startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile );
extern void cleanupVM( int );
#endif
|