Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove java3d #16647

Closed
gagern mannequin opened this issue Jul 11, 2014 · 14 comments
Closed

Remove java3d #16647

gagern mannequin opened this issue Jul 11, 2014 · 14 comments

Comments

@gagern
Copy link
Mannequin

gagern mannequin commented Jul 11, 2014

Even after running ./sage -i java3d, the java3d viewer will fail to load:

sage: D=dodecahedron()
sage: D.show(viewer="java3d", verbosity=True)
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D
at org.sagemath.sage3d.ObjectViewerApplet.showView(ObjectViewerApplet.java:49)
at org.sagemath.sage3d.ObjectViewerApplet.showView(ObjectViewerApplet.java:40)
at org.sagemath.sage3d.ObjectViewerApp.main(ObjectViewerApp.java:28)
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more

Adding a set -x to the sage3d script I see it executing these commands:

++ …/sage/local/bin/sage-pypkg-location sagenb
+ SAGE3D_HOME=…/sage/local/lib/python2.7/site-packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d
+ cd …/sage/local/lib/python2.7/site-packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d
+ export LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d/lib/amd64
+ LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-packages/sagenb-0.10.8.2-py2.7.egg/sagenb/data/sage3d/lib/amd64
+ java -classpath lib/sage3d.jar:lib/ext/j3dcore.jar:lib/ext/vecmath.jar:lib/ext/j3dutils.jar org.sagemath.sage3d.ObjectViewerApp …/tmp_ctQ56m.obj

That …/sage3d/lib/amd64 directory mentioned in LD_LIBRARY_PATH does not exist. Its parent, the lib directory, contains sage3d.jar as its sole content. Most things mentioned on the classpath don't exist either. instead, sage/local/java/sun-libs/ contains several jars related to Java3D.

I also wonder about the version of the spkg, which is given as 20070901. I think there are newer versions around, although they are a bit hard to find. Referencs I found:

I would suggest packaging Java3D 1.6.0-pre10 as a spkg and trying to get it to work. Or dump support for Java3D altogether.

Component: graphics

Keywords: java3d

Author: Frédéric Chapoton

Branch/Commit: b9a1299

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/16647

@gagern gagern mannequin added this to the sage-6.3 milestone Jul 11, 2014
@gagern gagern mannequin added c: graphics labels Jul 11, 2014
@kcrisman
Copy link
Member

comment:1

Yeah, dumping it may be the thing. Or at least to raise a warning that java3d doesn't currently work well or something...

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@williamstein
Copy link
Contributor

comment:3

I vote for dumping java3d "support". It's not like we are supporting it. This was just a package/functionality that Robert Bradshaw put together as a sort of herculean challenge at Sage Days 7.

@kcrisman
Copy link
Member

comment:4

In that event, there would probably be some places in sagenb that would need to change too. Especially with jsmol working and various other js libraries working in the cell and cloud, this seems okay.

@kcrisman
Copy link
Member

comment:5

Also note that there is a file plot3d/help (see this comment) that should then be removed.

@fchapoton

This comment has been minimized.

@fchapoton
Copy link
Contributor

Branch: public/16647

@fchapoton
Copy link
Contributor

Changed keywords from none to java3d

@fchapoton
Copy link
Contributor

Commit: b9a1299

@fchapoton
Copy link
Contributor

comment:7

Here is a first try, maybe there are still things to do in packages or notebook ?


New commits:

b9a1299trac #16647 removal of support for java3d

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Sep 26, 2015

comment:9

I tried it a few months ago and java3d works. Note that its a separate install and not part of the standard Java download, so its a bit tricky to install to put it mildly. Though I agree that it is so obscure that it is of no real use.

@fchapoton fchapoton modified the milestones: sage-6.9, sage-7.0 Dec 15, 2015
@jdemeyer jdemeyer changed the title java3d doesn't work. Remove java3d Dec 22, 2015
@jdemeyer
Copy link

comment:12

SageNB certainly has infrastructure to support java3d through a Java package which is called "sage3d". You can find the sources in ./data/sage3d/src/org/sagemath/sage3d/. I don't really understand what it does.

@vbraun
Copy link
Member

vbraun commented Dec 27, 2015

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Dec 28, 2015

Changed branch from public/16647 to b9a1299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants