Error in java code for controlling scorbot

Hello,

I work with the educatonal model robot scorbot er III and recently found an interface written in java for controlling it. When executing the code as "java Remote" in my Windows Xp operational system, I receive the foolowing error

Exception in thread "main" java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration

at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:954)

at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:997)

at RemoteCanvas3D.<init>(RemoteCanvas3D.java:50)

at Remote.<init>(Remote.java:371)

at Remote.main(Remote.java:282)

Since I am not very familiar with Java, could anyone explain me how to get over this problem?

Thank you in advance

Theodoros

[793 byte] By [Theodorosa] at [2007-11-27 5:24:40]
# 1

I had this same error in a 3D game I was making.

The code needs something like this when initializing the Canvas3D, most likely in a constructor.

GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();

Canvas3D canvas3D = new Canvas3D(config);

hope that helps

seegreena at 2007-7-12 14:44:08 > top of Java-index,Security,Cryptography...