Error while copying native libraries

Hi,



I got a new Problem with JME3 :slight_smile:

jjmontes was trying to play Marble Mania (thanks again!), but he got the following Exception:



GRAVE: Error while copying native libraries

java.io.FileNotFoundException: C:Program Files (x86)Mozilla Firefoxlwjgl.dll (Acceso denegado)

at java.io.FileOutputStream.open(Native Method)

at java.io.FileOutputStream.(Unknown Source)

at java.io.FileOutputStream.(Unknown Source)

at com.jme3.system.Natives.extractNativeLib(Natives.java:72)

at com.jme3.system.Natives.extractNativeLibs(Natives.java:167)

at com.jme3.system.JmeSystem.initialize(JmeSystem.java:347)

at com.jme3.system.JmeSystem.newContext(JmeSystem.java:267)

at com.jme3.app.Application.start(Application.java:316)

at com.jme3.app.Application.start(Application.java:299)

at de.bazinga.marblemania.game.Game.start(Game.java:210)

at de.bazinga.marblemania.gui.menu.MenuMessageListener.messageReceived(MenuMessageListener.java:46)

at de.bazinga.marblemania.network.client.listener.MessageListener.messageReceived(MessageListener.java:47)

at com.jme3.network.connection.Connection.fireMessageReceived(Connection.java:346)

at com.jme3.network.connection.TCPConnection.read(TCPConnection.java:204)

at com.jme3.network.connection.Connection.run(Connection.java:124)

at com.jme3.network.connection.ConnectionRunnable.run(ConnectionRunnable.java:86)

at java.lang.Thread.run(Unknown Source)

22-dic-2010 22:53:48 com.jme3.network.connection.ConnectionRunnable$1 uncaughtException

GRAVE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,javawsApplicationThreadGroup]

java.lang.UnsatisfiedLinkError: Can’t load library: C:Program Files (x86)Mozilla Firefoxlwjgl.dll

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.load0(Unknown Source)

at java.lang.System.load(Unknown Source)

at org.lwjgl.Sys$1.run(Sys.java:69)

at java.security.AccessController.doPrivileged(Native Method)

at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)

at org.lwjgl.Sys.loadLibrary(Sys.java:81)

at org.lwjgl.Sys.(Sys.java:98)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:182)

at java.lang.Thread.run(Unknown Source)




I think the Problem is, that he isn’t logged in as an Admin and so he can’t copy the Libraries.

[EDIT: He is logged in as an Admin, so that’s not the Problem)]



Can I fix this Problem somehow like copy the library files somewhere else? I’m actually already creating some Files in Marble Mania and those are created.



And could you maybe pass the Exception somehow so I can handle it myself (e.g. to the SystemListener)?

Right now it is just passed to the Logger (JmeSystem Line 349) and I don’t really have an opportunity to react to the exception.



Greets,

Dennis

I don’t understand whats happening though, is this webstart or applet? When you run in a limited environment you are to disable native extraction using JmeSystem.setLowPermissions(true). For webstart, you are to use the lwjgl webstart extension, and for applet you are to use jMP’s applet deployment feature which generates an applet for you automatically that does everything.

It’s a webstart, however for me with opera it works without problems, so this is kinda odd.

It’s a Webstart.



I just added the extension to the Webstart and removed the ljwgl.jar.

It works for me, but now I get two warnings, that the programm wants to access something and what happens if they upload a new Version that isn’t compatible with jme3?



Or would it be enough if I just call JmeSystem.setLowPermissions(true) and keep including the lwjgl.jar from jme3?

I doubt they will upload a version that isn’t compatible, API changes like that are rare.

You might be getting two dialogs now because your own app is still requesting permissions in addition to lwjgl requesting permissions