This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Exception when using libgdx. org.lwjgl.LWJGLException: Could not locate OpenAL library. It doesnt happen with Eclipse. Video Showing the Error : http://www.youtube.com/watch?v=rMtMBR1Cfn8 Product Version = NetBeans IDE 7.4 Beta (Build 201307092200) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_21 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Created attachment 137729 [details] Log do IDE
The video explains everything. http://www.youtube.com/watch?v=rMtMBR1Cfn8
Post i made regarding that issue. http://www.java-gaming.org/topics/netbeans-7-4-still-bugs-with-libgdx-video/30228/view.html Some users/Developers came with ideas.
The problem is in loading the native library by OpenAL not with the IDE. You need to either set up environment variables correctly or set the OpenAL library. If you attach a self contained test project (J2SEApplication with per project libraries) showing the problem I will look how the OpenAL old the library and help.
Created attachment 137883 [details] Here is the project for the test that was required. Plus the Jglfw Library and the other libraries. Here is the project for the test that was required. Plus the Jglfw Library and the other libraries.
(In reply to comment #4) > The problem is in loading the native library by OpenAL not with the IDE. You > need to either set up environment variables correctly or set the OpenAL > library. > > If you attach a self contained test project (J2SEApplication with per project > libraries) showing the problem I will look how the OpenAL old the library and > help. Attached. Plus, JGO was told about this. So they may come assist!
I've updated the test project to be self contained, it can be downloaded from https://dl.dropboxusercontent.com/u/79648505/JavaProject1.zip
(In reply to comment #7) > I've updated the test project to be self contained, it can be downloaded from > https://dl.dropboxusercontent.com/u/79648505/JavaProject1.zip I Appreciate Tomas. I will have to do a College presentation to all Science classes with this project/ library. SO its very important to me and to Netbeans that it doesnt show that bug in front of everyone.
On Mac both the: JglfwApplication jglfwApplication = new JglfwApplication(new MyGdxGame(),"",480,320,true); and the: LwjglApplication lwjglApplication = new LwjglApplication(new MyGdxGame(), "", 480, 320, true); works fine, the empty window is opened and no exception is reported. I will attach an image. Unfortunately I have no Windows with OpenGL support, just a virtual machine. I will ask someone with real Windows Machine to try tomorrow. Is my expectation that the: LwjglApplication lwjglApplication = new LwjglApplication(new MyGdxGame(), "", 480, 320, true); should fail correct? Or do I need something more to get the exception?
Created attachment 137957 [details] Screenshot
One more question: Are you using the same library and JDK when you run the application in NetBeans and Eclipse? There may be 32/64 architecture problem on Windows, the Mac is 64bit only.
Oh yes, im using same library, same classes. And you have to use LwjglApplication lwjglApplication indeed. It seems it only happens in some systems, might be some Country-issue ? My Windows is a BR win7 64 bit version,jdk 64 bit u25 , jre u25 64bit as well. It shows up, like in the youtube video, but it gives the exception.It runs well, but shows the Exception.
I've found http://code.google.com/p/libgdx/issues/detail?id=1419 The important part is: >Not sure what we can do about that. The native libraries are in the gdx-backend-lwjgl-natives.jar. If >that's in your classpath, then libgdx will load the shared libraries manually. It looks as though that jar is >not in your classpath when you execute the app. The classpath can be easily verified by setting the Tools/Options/Java/Ant/Verbosity Level to debug. The output will contain lots of messages including the exact command to launch the JVM. Can you attach the Ant/Verbose output. Another important part is: > I use IntelliJ IDEA,and found the same Exception! According to this it does not seem to be NetBeans issue, it seems rather libgdx issue. I am not sure how reliable is the manual load of shared libs in libgdx. Attaching the Ant verbose output will show. Thanks
Seems that OpenAL initialisation is not very stable on on Windows: http://lwjgl.org/forum/index.php?topic=3253.0
Hm, i will send this to JGO Post.
Created attachment 137983 [details] Running without exception I have tried attached project on Windows 7 x64, JDK 7u25, NetBeans Dev. As you can see from attached screenshot, application compiles fine and runs OK.
Roman has tested the libgdx on Windows and it works also fine, it seems as some race in libgdx. Anyway the problem is in libgdx not in NetBeans which correctly launches the application with correct classpath as seen in and debug: Executing '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/bin/java' with arguments: '-Dfile.encoding=UTF-8' '-classpath' '/Users/tom/Downloads/JavaProject1/lib/gdx-backend-lwjgl-natives.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-backend-lwjgl-sources.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-backend-lwjgl.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-natives.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-sources.jar:/Users/tom/Downloads/JavaProject1/lib/gdx.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-backend-jglfw-natives.jar:/Users/tom/Downloads/JavaProject1/lib/gdx-backend-jglfw.jar:/Users/tom/Downloads/JavaProject1/build/classes' 'com.me.mygdxgame.Main' All native jars are on runtime classpath. The problem has to be solved in libgdx. If you don't need audio you can use: LwjglApplicationConfiguration.disableAudio = true; which may help as the OpenAL will not be initialised.
Doesnt happen in Eclipse.. I cant bealive i will have to betray netbeans... Well, at least i will be able to use sound.
<cite> If that's in your classpath, then libgdx will load the shared libraries manually. </cite> IDE correctly launches the app with OpenAL library on classpath as seen & explained above. That it does not happen in Eclipse but happens in Idea (Swing based IDE) may be a timing issue or the DSP can be already initialised or whatever, it's a problem of the OpenAL. You should solve the problem in OpenAL bugzilla.
Roger! Do you have a link for the openAL Bug report? I will be sure to report this! Thanks for the help!
As seen in comment #7: >I have tried attached project on Windows 7 x64, JDK 7u25, NetBeans Dev. As you >can see from attached screenshot, application compiles fine and runs OK. Works also with NB, probably depending on timing as described on thread attached above. This is an another proof that the problem is in OpenAL library. The thread describes both the problem with NULL hwnd and also some kind of workaround of the problem (waiting for the non NULL handle) which you may try when you need the sound.
Tomas, i fixed it by doing this : System.setProperty("user.name","EnglishWords"); Application lpp = new LwjglApplication(listener, title, width, height,useOpenGLES2); The bug doesnt happen anymore. Just using that property, would you have a look again please?
The user.name property is set by the JVM when it's created. As seen in the comment #17 the only property passed by the IDE to the JVM is file.encoding which is set to the value specified in the Project Properties/Sources/Source Encoding. The problem is in OpenAL (according to docs the only requirement is presence on classpath which is fulfilled). I will need to debug the OpenAL to find out what's the root cause unfortunately I have neither time for it nor Windows with C/C++ dev kit. You need to report it to OpenAL.