APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

How to enalble JAVA3D ?

Return to the EJS Modeling forum
Login to post to this thread

First attempt
Juan Maria Fernandez
11 Posts

1) Download JAVA3D from https://java3d.java.net/binary-builds.html

2) Changing the CLASSPATH variable, adding to the old one:

C:\Program Files\Java\Java3D\1.5.2\lib\ext\j3dcore.jar;C:\Program Files\Java\Java3D\1.5.2\lib\ext\j3dutils.jar;C:\Program Files\Java\Java3D\1.5.2\lib\ext\vecmath.jar

this way the system knows where are the JAVA3D jar  files

That made, reboot, and after launch of EJS, creating a 3D model and trying to pass IMPLEMENTATION property in a drawingPanel3D  from SIMPLE3D to JAVA3D.

But a null pointer exception appears and the thing do not work at all.

Sure I am missing something, perhaps in the system installing of JAVA3D, perhaps in telling EJS that JAVA3D is in the system, perhaps in some previous work on the simulation. No idea to do next :-((


Could you help, please?


*********
The long error message:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.opensourcephysics.drawing3d.java3d.Java3dDrawingPanel3D.setEyeDistance(Java3dDrawingPanel3D.java:292)
at org.opensourcephysics.drawing3d.java3d.Java3dDrawingPanel3D.(Java3dDrawingPanel3D.java:108)
at org.opensourcephysics.drawing3d.DrawingPanel3D.doSetImplementation(DrawingPanel3D.java:257)
at org.opensourcephysics.drawing3d.DrawingPanel3D.setImplementation(DrawingPanel3D.java:237)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.setValue(ControlDrawingPanel3D.java:569)
at org.colos.ejs.library.control.ControlElement.setProperty(ControlElement.java:579)
at org.colos.ejs.library.control.ControlElement.setProperty(ControlElement.java:493)
at org.colos.ejs.library.control.drawing3d.ControlDrawingPanel3D.setProperty(ControlDrawingPanel3D.java:456)
at org.colos.ejs.osejs.view.ViewElement.setTheProperty(ViewElement.java:891)
at org.colos.ejs.osejs.view.ViewElement.doTheChange(ViewElement.java:1444)
at org.colos.ejs.osejs.view.ViewElement.access$7(ViewElement.java:1439)
at org.colos.ejs.osejs.view.ViewElement$MyMouseListener.mouseClicked(ViewElement.java:1435)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Thanks ind advance.


Current Replies - View all
Re: First attempt   (Francisco Esquembre - )
Re: Re: First attempt   (Juan Maria Fernandez - )
OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book