LWJGL
May 22, 2012, 03:06:49 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: wavedata.create nullpointerexception  (Read 4312 times)
amoeba
Regular nerd
**
Posts: 56


« on: December 05, 2007, 13:47:11 »

I am getting an odd problem when trying to run the OpenAL lesson 5 example with netbeans.

When I try to run I get;
Code:
D:\lesson5>java -Djava.library.path=lib/win32 -jar "D:\lesson5\dist\lesson5.jar"
java.lang.NullPointerException
        at org.lwjgl.util.WaveData.create(WaveData.java:95)
        at org.lwjgl.util.WaveData.create(WaveData.java:112)
        at Lesson5.loadALData(Lesson5.java:125)
        at Lesson5.execute(Lesson5.java:222)
        at Lesson5.main(Lesson5.java:261)
Exception in thread "main" java.lang.NullPointerException
        at Lesson5.loadALData(Lesson5.java:126)
        at Lesson5.execute(Lesson5.java:222)
        at Lesson5.main(Lesson5.java:261)

Is this problem caused by a missing the openal32.dll? I have it in /lib/win32 with the rest of the DLLs.
Logged
amoeba
Regular nerd
**
Posts: 56


« Reply #1 on: December 05, 2007, 13:50:45 »

When I run in debug I get this further information:

ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [../../../src/share/back/util.c:820]
Logged
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #2 on: December 05, 2007, 14:23:29 »

the debug stuff is unrelated, but the NPE is because the res folder isn't on the classpath so it fails to locate the file in the create method
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
amoeba
Regular nerd
**
Posts: 56


« Reply #3 on: December 05, 2007, 15:16:02 »

The res folder is the Eclipse folder where the classes get compiled or where the jar gets put?
Logged
Matzon
Administrator
Demigod
*****
Posts: 2177



« Reply #4 on: December 05, 2007, 22:08:00 »

the res folder is the res folder when you extracted lwjgl Smiley
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
amoeba
Regular nerd
**
Posts: 56


« Reply #5 on: December 06, 2007, 01:03:59 »

Why do I need the res folder in classpath, it just contains some sound and image files?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!