Opened 6 years ago

Closed 5 years ago

#16647 closed defect (fixed)

Remove java3d

Reported by: gagern Owned by:
Priority: major Milestone: sage-7.0
Component: graphics Keywords: java3d
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: b9a1299 (Commits) Commit: b9a129903eb5a867ef195035d9dc8b870106ea28
Dependencies: Stopgaps:

Description (last modified by chapoton)

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

sage: D=dodecahedron()
sage:"java3d", verbosity=True)
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D
at org.sagemath.sage3d.ObjectViewerApplet.showView(
at org.sagemath.sage3d.ObjectViewerApplet.showView(
at org.sagemath.sage3d.ObjectViewerApp.main(
Caused by: java.lang.ClassNotFoundException:
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 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-
+ cd …/sage/local/lib/python2.7/site-packages/sagenb-
+ export LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-packages/sagenb-
+ LD_LIBRARY_PATH=…/sage/local/lib/python2.7/site-packages/sagenb-
+ 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.

Change History (14)

comment:1 Changed 6 years ago by kcrisman

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

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:3 Changed 6 years ago by was

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.

comment:4 Changed 6 years ago by kcrisman

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.

comment:5 Changed 5 years ago by kcrisman

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

comment:6 Changed 5 years ago by chapoton

  • Description modified (diff)

comment:7 Changed 5 years ago by chapoton

  • Authors set to Frédéric Chapoton
  • Branch set to public/16647
  • Commit set to b9a129903eb5a867ef195035d9dc8b870106ea28
  • Keywords java3d added
  • Status changed from new to needs_review

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

comment:8 Changed 5 years ago by chapoton

  • Milestone changed from sage-6.4 to sage-6.9

comment:9 Changed 5 years ago by vbraun

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.

comment:10 Changed 5 years ago by chapoton

  • Milestone changed from sage-6.9 to sage-6.11

comment:11 Changed 5 years ago by jdemeyer

  • Summary changed from java3d doesn't work. to Remove java3d

comment:12 Changed 5 years ago by jdemeyer

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.

comment:13 Changed 5 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:14 Changed 5 years ago by vbraun

  • Branch changed from public/16647 to b9a129903eb5a867ef195035d9dc8b870106ea28
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.