blob: b99d1aefeb2d1bd5c65f61c72834da16fceeb92a (
plain) (
blame)
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
|
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
#ifndef ECLIPSE_JNI_H
#define ECLIPSE_JNI_H
#include "eclipseUnicode.h"
#include <jni.h>
#ifdef UNICODE
#define loadVMLibrary loadVMLibraryW
#define unloadVMLibrary unloadVMLibraryW
#define getInvocationFunction getInvocationFunctionW
#define launchJavaVM launchJavaVMW
#define setExitData setExitDataW
#define startJavaVM startJavaVMW
#endif
extern _TCHAR * exitData;
typedef jint (JNICALL *JNI_createJavaVM)(JavaVM **pvm, JNIEnv **env, void *args);
void setExitData(JNIEnv *env, jstring s);
/* JNI Callback methods */
/* Use name mangling since we may be linking these from java with System.LoadLibrary */
#define set_exit_data Java_org_eclipse_core_launcher_JNIBridge__1set_1exit_1data
#define update_splash Java_org_eclipse_core_launcher_JNIBridge__1update_1splash
#define get_splash_handle Java_org_eclipse_core_launcher_JNIBridge__1get_1splash_1handle
/*
* org_eclipse_core_launcher_JNIBridge#_set_exit_data
* Signature: (Ljava/lang/String;)V
*/
extern JNIEXPORT void JNICALL set_exit_data(JNIEnv *, jobject, jstring);
/*
* org_eclipse_core_launcher_JNIBridge#_update_splash
* Signature: ()V
*/
extern JNIEXPORT void JNICALL update_splash(JNIEnv *, jobject);
/*
* org_eclipse_core_launcher_JNIBridge#_get_splash_handle
* Signature: ()I
*/
extern JNIEXPORT jint JNICALL get_splash_handle(JNIEnv *, jobject);
/* 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 int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[] );
#endif
|