*
The moose likes Game Development and the fly likes Java 3D SimpleSounds Example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Java 3D SimpleSounds Example" Watch "Java 3D SimpleSounds Example" New topic
Author

Java 3D SimpleSounds Example

Brendan Cregan
Ranch Hand

Joined: Nov 11, 2011
Posts: 35
Hi,

I have been trying to mess around with Java 3D, in particular the 3D sound engine, I found this example code for a SimpleSounds Applet and im getting compiling errors with the example code, I was just wondering does anyone have any experience with this example and how to get it working?

So the error is

Exception in thread "main" java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:963)
at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1006)
at SimpleSounds.<init>(SimpleSounds.java:47)
at SimpleSounds.main(SimpleSounds.java:249)


And the example code is



Thanks in advance for any help with this issue!

Brendan
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 557
I have no experience, but the Canvas3D API I found specifically prohibits a null parameter, making your statement at line 47 unacceptable. I accept that an API I found randomly on the web may not correspond to the actual library you're using, so please consider my suggestion suspect until proven otherwise.


Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Java 3D SimpleSounds Example
 
Similar Threads
Help Java3d
Java3D Animation problem (Loads up components, then skips animation. No errors. Less than 75 lines.)
Problem with lighting in Java3D
Problem with lighting in Java3D
Error (compile time) for JAVAX package