Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LibGDX / LWJGL Could not locate OpenAL library  (Read 1533 times)
0 Members and 1 Guest are viewing this topic.
Offline KevinWorkman

JGO Wizard


Medals: 51
Projects: 11
Exp: 12 years


klaatu barada nikto


« Posted 2013-06-03 14:52:56 »

Hey all,

I've been using libGDX to deploy as an applet and webstart (and to Android, but that doesn't matter to my question).

On Java 6, everything works fine as both an applet and webstart.

However, after upgrading to Java 7, I get an Exception when I try to run it as an applet- either from the webpage, or from eclipse directly. The Exception stack trace is as follows:

org.lwjgl.LWJGLException: Could not locate OpenAL library.
   at org.lwjgl.openal.AL.create(AL.java:151)
   at org.lwjgl.openal.AL.create(AL.java:102)
   at org.lwjgl.openal.AL.create(AL.java:201)
   at com.badlogic.gdx.backends.openal.OpenALAudio.<init>(OpenALAudio.java:69)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:78)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:67)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplet$LwjglAppletApplication.<init>(LwjglApplet.java:34)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplet$2.addNotify(LwjglApplet.java:72)
   at java.awt.Container.addNotify(Container.java:2769)
   at java.awt.Panel.addNotify(Panel.java:87)
   at java.awt.Container.addImpl(Container.java:1114)
   at java.awt.Container.add(Container.java:431)
   at sun.applet.AppletPanel.runLoader(AppletPanel.java:769)
   at sun.applet.AppletPanel.run(AppletPanel.java:379)
   at java.lang.Thread.run(Thread.java:722)


The latest applet that this affects is here: http://staticvoidgames.com/play/?game=SumoBounce&view=applet

And the webstart version of that same exact code, which works fine on both Java 6 and 7, is here: http://staticvoidgames.com/play/?game=SumoBounce&view=webstart

I've tested this on various computers, as well as had other people test it. Running the applet works fine on Java 6, but throws the above Exception after upgrading the same machine to Java 7.

Is this a known issue, or a symptom of me doing something dumb? I can provide code, but I'm not doing anything too crazy, plus that Exception doesn't mention any of my code.

As always, I appreciate any help you can give me.

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline Andre Lopes
« Reply #1 - Posted 2013-06-03 15:05:49 »

Hey all,

I've been using libGDX to deploy as an applet and webstart (and to Android, but that doesn't matter to my question).

On Java 6, everything works fine as both an applet and webstart.

However, after upgrading to Java 7, I get an Exception when I try to run it as an applet- either from the webpage, or from eclipse directly. The Exception stack trace is as follows:

org.lwjgl.LWJGLException: Could not locate OpenAL library.
   at org.lwjgl.openal.AL.create(AL.java:151)
   at org.lwjgl.openal.AL.create(AL.java:102)
   at org.lwjgl.openal.AL.create(AL.java:201)
   at com.badlogic.gdx.backends.openal.OpenALAudio.<init>(OpenALAudio.java:69)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:78)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:67)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplet$LwjglAppletApplication.<init>(LwjglApplet.java:34)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplet$2.addNotify(LwjglApplet.java:72)
   at java.awt.Container.addNotify(Container.java:2769)
   at java.awt.Panel.addNotify(Panel.java:87)
   at java.awt.Container.addImpl(Container.java:1114)
   at java.awt.Container.add(Container.java:431)
   at sun.applet.AppletPanel.runLoader(AppletPanel.java:769)
   at sun.applet.AppletPanel.run(AppletPanel.java:379)
   at java.lang.Thread.run(Thread.java:722)


The latest applet that this affects is here: http://staticvoidgames.com/play/?game=SumoBounce&view=applet

And the webstart version of that same exact code, which works fine on both Java 6 and 7, is here: http://staticvoidgames.com/play/?game=SumoBounce&view=webstart

I've tested this on various computers, as well as had other people test it. Running the applet works fine on Java 6, but throws the above Exception after upgrading the same machine to Java 7.

Is this a known issue, or a symptom of me doing something dumb? I can provide code, but I'm not doing anything too crazy, plus that Exception doesn't mention any of my code.

As always, I appreciate any help you can give me.

What libraries are you using from libgdx?
I was having same error.
I removed one unnecessary lib and it stopped.
Also, Netbeans is known to give that stupid error.
Or instead of using lwjgl, use jwjgl, something like that, is another listener Cheesy
Offline KevinWorkman

JGO Wizard


Medals: 51
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #2 - Posted 2013-06-03 15:14:28 »

What libraries are you using from libgdx?
I was having same error.
I removed one unnecessary lib and it stopped.
Also, Netbeans is known to give that stupid error.
Or instead of using lwjgl, use jwjgl, something like that, is another listener Cheesy


Thanks for the fast reply. All I'm doing is using the libGDX setup ui to create the project, so I'm only using whatever libraries it sets up. The error happens upon initialization, so it doesn't even seem to get to my code.

What library did you remove? All I have are the LWJGL libraries, which I'm pretty sure I need. I'm unfamiliar with JWJGL, but I want to stick with LWJGL if at all possible.

I'm only guessing, but I think maybe Java 7 has stricter security that's disallowing something that LWJGL needs, but like I said, that's really only a shot in the dark.

I'm using eclipse, not netbeans.

Static Void Games - Play indie games, learn game programming, upload your own games!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2013-06-03 20:03:58 »

What libraries are you using from libgdx?
I was having same error.
I removed one unnecessary lib and it stopped.
Also, Netbeans is known to give that stupid error.
Or instead of using lwjgl, use jwjgl, something like that, is another listener Cheesy


Thanks for the fast reply. All I'm doing is using the libGDX setup ui to create the project, so I'm only using whatever libraries it sets up. The error happens upon initialization, so it doesn't even seem to get to my code.

What library did you remove? All I have are the LWJGL libraries, which I'm pretty sure I need. I'm unfamiliar with JWJGL, but I want to stick with LWJGL if at all possible.
You can use the backend based on JogAmp (JOGL 2 + JOAL 1.1.3) but I'm not sure it will solve your problem.

I'm only guessing, but I think maybe Java 7 has stricter security that's disallowing something that LWJGL needs, but like I said, that's really only a shot in the dark.

I'm using eclipse, not netbeans.
Maybe try with the nightly build of LWJGL 2.9. Check that you request all permissions in applets with JNLP and if you use any kind of inter-applets JavaScript communication, use Trusted-Library=true in the manifest of your JAR(s) (mandatory since the update 21).

Offline ra4king

JGO Kernel


Medals: 336
Projects: 2
Exp: 5 years


I'm the King!


« Reply #4 - Posted 2013-06-03 23:04:15 »

Quote
.... snip ....
You can use the backend based on JogAmp (JOGL 2 + JOAL 1.1.3) but I'm not sure it will solve your problem.
SERIOUSLY?!


@Kevin
Do you have the OpenAL natives on the library path?

Running the applet, I also get this exception:
1  
2  
3  
4  
5  
6  
7  
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "org.lwjgl.input.Mouse.allowNegativeMouseCoords" "write")
   at java.security.AccessControlContext.checkPermission(Unknown Source)
   at java.security.AccessController.checkPermission(Unknown Source)
   at java.lang.SecurityManager.checkPermission(Unknown Source)
   at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
   at java.lang.System.setProperty(Unknown Source)
   at com.badlogic.gdx.backends.lwjgl.LwjglNativesLoader.<clinit>(LwjglNativesLoader.java:29)


Weird thing is, I did accept the security message, no clue why this would be thrown. O_o

Offline KevinWorkman

JGO Wizard


Medals: 51
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #5 - Posted 2013-06-04 01:46:38 »

:headdesk:

Well, it turns out I'm an idiot. I forgot to include the permissions in the applet jnlp. Doh.

Looks like it's working perfectly now. Not totally sure how to fix it in eclipse, but I'm not too worried about that at this point.

Thanks for your input guys, you helped me troubleshoot my stupidity!

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline gouessej
« Reply #6 - Posted 2013-06-05 19:52:23 »

I forgot to include the permissions in the applet jnlp.
I did it once at work, it worked very well before the update 21 when the JARs were signed but it breaks with the update 21, you have to sign the JARs and ask the permissions to get them.

Offline KevinWorkman

JGO Wizard


Medals: 51
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #7 - Posted 2013-06-05 20:45:46 »

I forgot to include the permissions in the applet jnlp.
I did it once at work, it worked very well before the update 21 when the JARs were signed but it breaks with the update 21, you have to sign the JARs and ask the permissions to get them.

Ahh, I knew something had changed with this, but I wasn't sure what. I've had similar issues in the past (sometimes it's enough to sign a jar, other times you have to ask permissions as well). I'm still not totally sure when one will work over the other, but at least I know that LWJGL requires both signing the jar and requesting permissions.

Static Void Games - Play indie games, learn game programming, upload your own games!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52

SHC (70 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!