United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7158157 : [macosx] Can't find native libraries with .jnilib in Web Start apps

Details
Type:
Bug
Submit Date:
2012-03-30
Status:
Closed
Updated Date:
2013-12-09
Project Name:
JDK
Resolved Date:
2012-04-12
Component:
deploy
OS:
os_x
Sub-Component:
webstart
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u6
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
Beginning with 7u4, .dylib is the correct extension for native libraries, but many Mac OS X-based Web Start apps and signed applets still use the old but equally valid .jnilib. 

JNLPClassLoader and its variants now assume that native libraries will be named .dylib on mac OS X in findLibrary() when searching for them in the cached resources, so apps that call System.loadLibrary("xxx") will now fail if the library 'xxx' is named libxxx.jnilib.

JNLPClassLoader, JNLP2ClassLoader and JNLPPreVerifyClassLoader all need to look for both dylib and jnilib on Mac OS X. Also, Platform defines two methods for the prefix and suffix of native libraries, but instead we should just use System.mapLibraryName() to return the proper name instead of doing it ourselves.

                                    

Comments
regression_test_src:
http://sqe-hg.us.oracle.com/hg/index.cgi/testbase/javase/functional/8/deployment2/file/0a17ae96b5b1/new_framework/tests/javaws/interop/src/InteropTest.java (InteropTest::testNative)
                                     
2013-12-09
Verified with jre8-b119 on Mac10.8.4
                                     
2013-12-09
EVALUATION

Modified classloaders so they first look for the standard library name, as determined by System.mapLibraryName(). If it fails and we are on Mac, try again with .jnilib.
                                     
2012-04-03



Hardware and Software, Engineered to Work Together