dcsimg
JNI_GetCreatedJavaVMs and classpath
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jose_Araque
Posted On:   Friday, December 14, 2001 10:41 AM

After my code runs JNI_GetCreatedJavaVMs and AttachCurrentThread, how can I tell what classpath the created JVM uses? How can I modify this classpath? { int bufLen = 10; JavaVM *vmbuf[buflen]; jsize nVMs; JNIEnv *env; JDK1_1AttachArgs *t_args; if (JNI_GetCreatedJavaVMs(vmbuf, bufLen, &nVMs) < 0) thread_exit(); if (nVMs <= 0) thread_exit(); // attach to the running JVM, only one per process vmbuf[0]->AttachCurrentThread((void **)&env,(void    More>>

After my code runs JNI_GetCreatedJavaVMs and AttachCurrentThread, how can I tell what classpath the created JVM uses? How can I modify this classpath?



{



int bufLen = 10;



JavaVM *vmbuf[buflen];


jsize nVMs;




JNIEnv *env;



JDK1_1AttachArgs *t_args;






if (JNI_GetCreatedJavaVMs(vmbuf, bufLen, &nVMs) < 0) thread_exit();



if (nVMs <= 0) thread_exit();








// attach to the running JVM, only one per process



vmbuf[0]->AttachCurrentThread((void **)&env,(void **)&t_args);






// env->??? How do I get the classpath and/or modify it ???



}

   <<Less

Re: JNI_GetCreatedJavaVMs and classpath

Posted By:   Christophe_Dore  
Posted On:   Thursday, December 20, 2001 07:54 AM

I dont think you can modify the classpath of a JVM while it is running. Adding an URLClassLoader, with the correct URLs of the paths you need should work.
About | Sitemap | Contact