Hello Guest

[FIXED] applet loader + natives

  • 1 Replies
  • 4189 Views
*

Offline NateS

  • **
  • 91
    • Esoteric Software
[FIXED] applet loader + natives
« on: January 12, 2011, 14:18:15 »
I had trouble loading my own natives when using the applet loader. My native was extracted to the temp dir, but not found when my code did System.loadLibrary("name"). I see the applet loader sets java.library.path, not sure why that wasn't enough. I added this code to the URLClassLoader in the applet loader:

Code: [Select]
protected String findLibrary (String libname) {
return path + "natives/" + System.mapLibraryName(libname);
}

This allowed my native to be loaded.

*

Offline kappa

  • *****
  • 1313
Re: [BUG] applet loader + natives
« Reply #1 on: January 12, 2011, 20:19:01 »
fixed.

thx.