Bug 215 - Enhancement for NativeLibLoader
Summary: Enhancement for NativeLibLoader
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2006-04-09 11:32 CEST by Sven Gothel
Modified: 2015-09-27 03:14 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
Workaround: ---


Attachments
patch for NativeLibLoader against CVS HEAD (6.49 KB, text/plain)
2006-04-09 11:32 CEST, Sven Gothel
Details
the patched NativeLibLoader.java file (5.65 KB, text/plain)
2006-04-09 11:34 CEST, Sven Gothel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:48:41 CET


---- Reported by s_koehler 2006-04-09 11:32:14 ----

Hi,

in Issue 110 (https://jogl.dev.java.net/bugs/show_bug.cgi?id=110) i
sugguested, that people should be able to disable libloading. The goal was, to
be abled to provide an own way of library-loading - library loading without
using complicated ClassLoader techniques. 

Now, the number of libraries has been growing and the logic, when which library
is needed, are more complicated.

I have therefor decided to rewrite the NativeLibLoader so that it offers a
mechanism hook into the on-demand-loading of the libraries.

Important points concerning the rewrite:
- NativeLibLoader now consequently uses synchronized, no volatile things
(i don't think, that there is any noticable performance penality, since most of
loadXY()-methods are called only once during the live-time of the application)
- NativeLibLoader now offers a loadCGImpl()-method to replace the direct call to
System.loadLibrary("jogl_cg") within make/cg-common-CustomJavaCode.java
- A workaround for a JVM-Bug has been added, namely:
If you use bin\java.exe instead of jre\bin\java.exe to run a program with
System.loadLibrary("jawt"), then the JVM complaines about a missing awt.dll



---- Additional Comments From s_koehler 2006-04-09 11:32:55 ----

Created an attachment
patch for NativeLibLoader against CVS HEAD




---- Additional Comments From s_koehler 2006-04-09 11:34:18 ----

Created an attachment
the patched NativeLibLoader.java file




---- Additional Comments From s_koehler 2006-04-09 12:16:05 ----

Just another comment:

i used the line "Frame.getFrames();" to reference AWT, so that the awt.dll gets
loaded. If you know any better line, then use it. Another line that works is
"new Component() {};".



---- Additional Comments From kbr 2006-04-17 01:25:05 ----

Incorporated and cleaned up Cg library loading -- thanks for the patch.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:48 EDT  ---

This bug was previously known as _bug_ 215 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=215
Imported an attachment (id=78)
Imported an attachment (id=79)

The original submitter of attachment 78 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.
The original submitter of attachment 79 [details] is unknown.
   Reassigning to the person who moved it here: sgothel@jausoft.com.