JNIEXPORT void JNICALL
Java_Jhworld_callRoot (JNIEnv, jobject){
extern void InitGui();
VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
TROOT root("hello","Hello World", initfuncs);
printf("I am in callRoot \n");
int * argc= new int;
*argc=1;
char** argv=new char*;
*argv="app";
// TApplication theApp("App",argc,argv);
//int main(int argc, char **argv)
//{
TApplication theApp("App", argc, argv);
TCanvas *c = new TCanvas("c", "The Hello Canvas", 400, 400);
TPaveLabel *hello = new TPaveLabel(0.2,0.4,0.8,0.6,"Hello World");
hello->Draw();
c->Update();
// Enter event loop, one can now interact with the objects in
// the canvas. Select "Exit ROOT" from Canvas "File" menu to exit
// the event loop and execute the next statements.
theApp.Run(kTRUE);
TLine *l = new TLine(0.1,0.2,0.5,0.9);
l->Draw();
c->Update();
// Here we don't return from the eventloop. "Exit ROOT" will quit the app.
theApp.Run();
return;
}