Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Native resources on mac os x

843802Oct 31 2006 — edited Nov 9 2006
I am trying to get native resources loading with java web start on mac. I have search but I cannot seem to find a fix. I get an exception saying it could not locate the file in java.library.path. I have check a few things to make sure they are not causing the problems. I checked the library source to make sure they were loading the dylib with System.loadLibrary, I made sure that the file name was typed correctly and case sensitive, I made sure they were included in the right order in the jnlp file. The dylib and jnilib are being downloaded into the cache but System.loadLibrary can only find the jnilib. I have tried placing the dylib in the Library/Java/Extensions folder because that is in the java.library.path but that did not work either. I also tried changing the java.library.path and DYLIB_LIBRARY_PATH to paths that have the libraries in them but that did not work either. I know on my mac book I have to set DYLIB_LIBRARY_PATH for it to find the dylib but on this mac I do not when I run it from eclipse. I think it should work if I put it in a folder that is already in the java.library.path but this doesn't seem to work. Here are my two jnlp files:
<?xml version="1.0" encoding="utf-8"?>

<!-- The JNLP launch file for the game Bombs -->
<jnlp codebase="http://www.vbuser.com/Applications/Bombs" href="Bombs.jnlp">
	<information>
    		<title>Bombs</title>
    		<vendor>Curtis Collins</vendor>
    		<description>Bombs game</description> 
    		<offline-allowed/> 
  	</information>
	<security>
      		<all-permissions/>
  	</security>
	<resources>
    		<j2se version="1.5+"/>
		<jar href="Bombs.jar"/>    		
		<jar href="Data.jar"/>
		<jar href="xom-1.1.jar"/>	
		<nativelib href="libfmodex.dylib.jar"/>	
		<nativelib href="libNativeFmodEx.jnilib.jar"/>		
		<extension name="NativeFmodEx" href="NativeFmodEx.jnlp"/> 
  	</resources>
  	<application-desc main-class="com.vbuser.bombs.BombGame"/>
</jnlp>
and
<?xml version="1.0" encoding="utf-8"?>
<jnlp codebase="http://www.vbuser.com/Applications/Bombs" href="NativeFmodEx.jnlp">
 	<information>
		<title>NativeFmodEx</title>
		<vendor>http://jerome.jouvie.free.fr/index.php</vendor>
 	</information>
	<security>
      		<all-permissions/>
  	</security>	
	<resources>
		<jar href="NativeFmodEx.jar"/>
	</resources>
 	<component-desc/>
</jnlp> 
Does anyone know how to get System.loadLibrary to find the dylib?
Thanks,
vbuser
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2006
Added on Oct 31 2006
4 comments
350 views