LibraryPreloader preloadedLib;
class cJavaVM : public cThread {public:   enum State { Waiting, Starting, StartingJava, StartingAborted, Started, Stopping };   cJavaVM();   ~cJavaVM();   bool StartVM();   void ShutdownVM(bool synchronous);   void CheckAttachThread();   void CheckDetachThread();   bool CheckSystem();   //void SetVDRPluginPath(const char *path) { VDRpluginPath=path; } //path to VDR plugins   void Init(); //global init   //static const char *ClassPath();   //static const char *ClassHome();   //static const char *LibraryHome();protected:   bool AttachCurrentThread();   bool DetachCurrentThread();   int attachedThreads;   JavaVM *jvm;   JNIEnv *jvmEnv;   PerThreadJNIEnvProvider provider;      void (*javaExitFunc)(jint);   void (*javaAbortFunc)(void);      State state;   virtual void Action(void);   bool DoStartVM();   void DoShutdownVM();   void AbortStartingThread();private:   //static void adjustLibraryPath();   bool preloadLibs();   LibraryPreloader preloadedLib;   bool error;   pthread_t startingThreadPid;   //bool doShutdown;   //bool executed;   cMutex mutex;   cCondVar condVar;};