Writing classes with native methods without using System.loadLibrary(...)?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ercan_Oezkan
Posted On:   Thursday, January 31, 2002 02:49 AM

hi, is it possible to write java classes without calling System.loadLibrary(...)? It seems that this is possible, cause the guys from Sun, also make it like this, i have looked into System.java and don't found any Statement that invokes the loadLibrary function, to load the System library with the native implementation of for example currentTimeMillis(); The reason why i ask, is that i want to write a class and a native loader for this class. at some point i want to call a native function inside the loader from out of the loaded class, is this possible? Maybe there exists a way of linking a native progam or library from out of JNI, without using loadLibrary(...); greetz, Ercan Oezkan    More>>

hi,
is it possible to write java classes without calling System.loadLibrary(...)?
It seems that this is possible, cause the guys from Sun, also make it like this, i have looked into System.java and don't found any Statement that invokes the loadLibrary function, to load the System library with the native implementation of for example currentTimeMillis(); The reason why i ask, is that i want to write a class and a native loader for this class. at some point i want to call a native function inside the loader from out of the loaded class, is this possible? Maybe there exists a way of linking a native progam or library from out of JNI, without using loadLibrary(...);

greetz, Ercan Oezkan

   <<Less

Re: Writing classes with native methods without using System.loadLibrary(...)?

Posted By:   Christopher_Schultz  
Posted On:   Friday, February 1, 2002 05:55 AM

The Java API is allowed to cheat: there are plenty of libraries loaded by the VM that are never explicitly loaded using the loadLibaray call.



Alas, you will have to load your library in order to use it.



Why is this a problem?



-chris
About | Sitemap | Contact