Fail to run Java3D file

R

reexana

I copied a source code for a simple Java 3D program from this url
http://www.java2s.com/Code/Java/3D/HelloJava3Dbrendersasinglerotatedcube.htm

When I compiled the program, it displayed no error. However, when I
run the program, it displayed this error :

deps-jar:
compile-single:
run-single:
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 org.java.HelloJava3Db.<init>(HelloJava3Db.java:58)
at org.java.HelloJava3Db.main(HelloJava3Db.java:76)
Java Result: 1
BUILD SUCCESSFUL (total time: 14 seconds)

I have already installed Java3D 1.5.1 and copied all the 3 .jar files
in jdk1.6.0_02/jre/lib/ext.
What should I do now?

Any help n suggestion is appreciated.
Thanks

Regards,
Reexana
 
A

Andrew Thompson

reexana wrote:
...
Exception in thread "main" java.lang.NullPointerException: Canvas3D:
null GraphicsConfiguration ...
Any help n suggestion is appreciated.

Suggestions.
- Post to a forum more specific to Java3D, very few
people around here even have it installed, let alone
are well versed in it.
<http://www.google.com/search?q=Java3D+forum>
- Work on your search skills.
When I plug "Canvas3D: null GraphicsConfiguration"
into a common search engine and check the first few
hits, I get to this page..
<http://archives.java.sun.com/cgi-bin/wa?A2=ind0504&L=java3d-interest&P=1610>
Which states, amongst other things..
*** ERROR: Canvas3D constructed with a null GraphicsConfiguration
*** This will cause a NullPointerException in a subsequent release
I am guessing we are at a 'subsequent release'.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200708/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top