00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef JVMWRAPPER_H
00010 #define JVMWRAPPER_H
00011
00012 #include "JavaQxCommon.h"
00013
00014
00015
00016
00017
00024 class JAVAQX_EXPORT JVMWrapper
00025 {
00026 public:
00027 static void initialize(JavaVM *jvm);
00028 static JNIEnv *getEnv();
00029 static void exit(int status = -1);
00030 static void exitCritical(int status = -1);
00031 static bool attachCurrentThread();
00032 static bool detachCurrentThread();
00033 private:
00034 void static exitJVM(JNIEnv *env, int status);
00035 private:
00036 static JavaVM *sm_jvm;
00037 };
00038
00039 #endif // JVMWRAPPER_H
00040
00041
00042
00043
00044
00045
00046
00047