The Artima Developer Community
Sponsored Link

Java Answers Forum
JNI Question

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Navid M

Posts: 1
Nickname: navid89
Registered: Jul, 2006

JNI Question Posted: Jul 11, 2006 9:45 PM
Reply to this message Reply
Advertisement
Hello,

I was wondering how I could use the system class loader (i.e. the classloader that uses CLASSPATH) in the DefineClass method.

For some reason, the following code crashes JVM and generates a core dump, any idea why?
jclass classLoader;
jclass cls;
classLoader =
(jclass)(*env)->FindClass(env,"java/net/URLClassLoader");
cls = (jclass)(*env)->DefineClass(env, name, classLoader,
(jbyte*)data, size);

I'm just trying to use the URLClassLoader to load my class using DefineClass.

Any help would be greatly appreciated.

Thanks,
Navid

Topic: (Job) AJAX Developer- California, USA Previous Topic   Next Topic Topic: lock mouse and keyboard

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use