Loading Jar files from native C++ code

Joined
Oct 4, 2007
Messages
1
Reaction score
0
In my project requirement. I want to load 2 jar files after JVM create return success in C++.
In JVM startup parameter I passed the classpath as the location of jar files,
When through JNI interface I tried to find the class inside the jar file it says file not found.
previously I used to pass the jar file as a startparameter to JVM like below -

options[0].optionString = "..\\..\\ASkl.jar";
options[1].optionString = "..\\..\\BSkl.jar";
...
JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
...
env->FindClass("ASkl/ClassA");<---work fine
but when I'm not passing jar file as a startup parameter it is not working.
Can anybody help is there any way to load jar files in native code????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top