Bug 16

Summary: Accessibility breaks jogl
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 1   
Hardware: All   
OS: windows   
Type: DEFECT SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:45:28 CET


---- Reported by rmm20 2003-06-23 10:17:11 ----

If Java accessibility.properties is set to:
assistive_technologies=com.sun.java.accessibility.AccessBridge

the jawt.dll is loaded twice, with bad results:
This fails on both demos:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\>cd jogl\jogl\demos

CC:\jogl\jogl\demos\vertexArrayRange>java VertexArrayRange
Exception in thread "main" java.lang.UnsatisfiedLinkError: Native Library D:\Pro
gram Files\Java\j2re1.4.1_02\bin\jawt.dll already loaded in another classloader
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1437)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1389)
        at java.lang.Runtime.loadLibrary0(Runtime.java:788)
        at java.lang.System.loadLibrary(System.java:832)
        at com.sun.java.accessibility.AccessBridge$2.run(AccessBridge.java:736)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.java.accessibility.AccessBridge.<init>(AccessBridge.java:733)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:306)
        at java.lang.Class.newInstance(Class.java:259)
        at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:652)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:738)
        at java.awt.Window.getToolkit(Window.java:675)
        at java.awt.Window.init(Window.java:239)
        at java.awt.Window.<init>(Window.java:268)
        at java.awt.Frame.<init>(Frame.java:398)
        at VertexArrayRange.run(VertexArrayRange.java:192)
        at VertexArrayRange.main(VertexArrayRange.java:160)

Removing accessibility.properties from java jre\lib eliminates this error.
It also eliminates accessibility.

Robert Mitchell



---- Additional Comments From kbr 2003-06-30 01:14:09 ----

Probably fixable by catching UnsatisfiedLinkError in NativeLibLoader and looking
for the string "already loaded" in the detail message. Gross, but will work
without having to add native code to load jawt.dll / libjawt.so.




---- Additional Comments From kbr 2003-07-14 22:28:34 ----

I wasn't able to reproduce the UnsatisfiedLinkError below after installing the
AccessBridge, but have still put in a clause looking for a detail message
containing "already loaded" and skipping the exception in this case.




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

This bug was previously known as _bug_ 16 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=16