Original Post
I'm trying to use OpenAL in Java using the Sound3D toolkit. The following method is generating a null pointer exception and I can't figure out why: public int initSound(String device) { try { Context context = AudioSystem3D.createContext(AudioSystem3D.openDevice(device)); // This line causes the error. AudioSystem3D.makeContextCurrent(context); AudioSystem3D.init(); return 0; } catch(Exception e) { System.out.println(e); return -1; } } I'm passing the string "DirectSound3D" as the method's parameter. I assume its a device initialization thing, but I can't find a tutorial anywhere on how to use the Sound3D toolkit and the only tutorial I could find on using JOAL was so out of date that the example code didn't work. At all. Thanks for any help.