Click here to Skip to main content
15,903,786 members
Home / Discussions / Java
   

Java

 
AnswerRe: UnsupportedClassVersionError/Unsupported major.minor version 50.0 Pin
jiteshmohite@7342.com28-Jul-10 7:55
jiteshmohite@7342.com28-Jul-10 7:55 
QuestionRun Time Error in 'return functions->FindClass(this, name)' Pin
ravi12048625-Jul-10 21:55
ravi12048625-Jul-10 21:55 
AnswerRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan25-Jul-10 22:56
mveRichard MacCutchan25-Jul-10 22:56 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
ravi12048625-Jul-10 23:07
ravi12048625-Jul-10 23:07 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan25-Jul-10 23:50
mveRichard MacCutchan25-Jul-10 23:50 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
ravi12048626-Jul-10 2:58
ravi12048626-Jul-10 2:58 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan26-Jul-10 6:23
mveRichard MacCutchan26-Jul-10 6:23 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
ravi12048626-Jul-10 6:46
ravi12048626-Jul-10 6:46 
I am not posting the entire code,Tell me if its sufficient

Following is my Code:

int MyAPI(Parameters* Params, int i) {
     .
     .
     .
    JNIEnv *env;
    JavaVM *jvm;
    JavaVMInitArgs vm_args;
 	char clspath[400]="-Djava.class.path=";

    resCheckVM = JNI_GetCreatedJavaVMs(&jvm, bufLen, &nVMs);
    if( resCheckVM < 0 || nVMs < 1 )
	{
	.
	.
	.
	 JNI_GetDefaultJavaVMInitArgs(&vm_args);
	 fflush(stdout);
	 res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
	 if (res < 0)
   	     fprintf(stderr, "Failed to Create JVM.\n");
	 }
    else
	{
	 fflush(stdout);
	 res = (jvm)->AttachCurrentThread((void**)&env, NULL);
	 if (res < 0)
   	   fprintf(stderr, "Failed attaching current thread to JVM.\n");
	 }
		 
    cls = (env)->FindClass(Params[i].lib);
	
	if (cls == 0)
    {
      fprintf(stderr, "Can't find Prog class \n",Params[i].lib);
      return 1;
    }
        {
          fprintf(stderr, "Can't find function \n");
          return 1;
         }
         
.
.
.

		 return 0;

}



Here I am getting this message "Failed to Create JVM."
Then a run time error at FindClass(Params[i].lib).
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan26-Jul-10 9:01
mveRichard MacCutchan26-Jul-10 9:01 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
ravi12048627-Jul-10 23:24
ravi12048627-Jul-10 23:24 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan28-Jul-10 1:31
mveRichard MacCutchan28-Jul-10 1:31 
GeneralRe: Run Time Error in 'return functions->FindClass(this, name)' Pin
Richard MacCutchan28-Jul-10 9:10
mveRichard MacCutchan28-Jul-10 9:10 
QuestionJSF,AJAX notofications using javascript Pin
zamalkawe24-Jul-10 22:41
zamalkawe24-Jul-10 22:41 
AnswerRe: JSF,AJAX notofications using javascript Pin
Nagy Vilmos25-Jul-10 0:33
professionalNagy Vilmos25-Jul-10 0:33 
GeneralRe: JSF,AJAX notofications using javascript Pin
zamalkawe25-Jul-10 4:06
zamalkawe25-Jul-10 4:06 
AnswerRe: JSF,AJAX notofications using javascript Pin
David Skelly25-Jul-10 22:14
David Skelly25-Jul-10 22:14 
AnswerRe: JSF,AJAX notofications using javascript Pin
Ravi Sant19-Apr-11 3:54
Ravi Sant19-Apr-11 3:54 
QuestionMemory usage Pin
002comp18-Jul-10 20:56
002comp18-Jul-10 20:56 
AnswerRe: Memory usage Pin
Nagy Vilmos19-Jul-10 21:12
professionalNagy Vilmos19-Jul-10 21:12 
GeneralRe: Memory usage Pin
002comp19-Jul-10 23:50
002comp19-Jul-10 23:50 
QuestionHow to determine given file is a class file? Pin
glitteringsound13-Jul-10 20:43
glitteringsound13-Jul-10 20:43 
AnswerRe: How to determine given file is a class file? Pin
Cedric Moonen13-Jul-10 20:53
Cedric Moonen13-Jul-10 20:53 
GeneralRe: How to determine given file is a class file? Pin
glitteringsound13-Jul-10 20:56
glitteringsound13-Jul-10 20:56 
GeneralRe: How to determine given file is a class file? Pin
Cedric Moonen13-Jul-10 21:00
Cedric Moonen13-Jul-10 21:00 
GeneralRe: How to determine given file is a class file? Pin
glitteringsound13-Jul-10 21:12
glitteringsound13-Jul-10 21:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.