Author Topic: java vs java3d and visolate.jar  (Read 536 times)

Offline Almost-retired

  • Sr. Member
  • ****
  • Posts: 252
    • What keeps Gene out of the bars
java vs java3d and visolate.jar
« on: January 13, 2012, 05:40:15 PM »
Greetings all;

I am trying to make use of a java .jar called visolate.jar, which is an unusual way to carve out a printed circuit board with far less carving than any other method.

Unforch, MIT doesn't seem to have the source visible for this .jar file but I was told that it needed the stuff in the java3d package, which I have installed, but that didn't effect the error message at all.  The package installed 3 libraries in /usr/share/java/java3d, which doesn't appear to be the correct location.

An attempt to run this program:
[root@coyote fmj]# java -jar visolate-2.1.6.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/WakeupCriterion
        at visolate.Visolate.<init>(Visolate.java:66)
        at visolate.Visolate.<init>(Visolate.java:61)
        at visolate.Main.main(Main.java:65)
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.WakeupCriterion
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 3 more

 shows the above.  I straced that, but got so much output that I couldn't spot the real error.

Is there some ldconfig sort of proggy that I could run to fix this or ??

Thanks all

Cheers, Gene

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: java vs java3d and visolate.jar
« Reply #1 on: January 13, 2012, 07:17:47 PM »
This RepRapWiki page may help.

visolate's source code is available here.

EDIT: Looks like you're going to need Java JDK6. You have to download it from Oracle's page here. Someone with more Java knowledge than me will need to chime in, but it looks like you'll want JDK 6 Update 30 with NetBeans 7.1.

« Last Edit: January 13, 2012, 07:28:34 PM by djohnston »
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Almost-retired

  • Sr. Member
  • ****
  • Posts: 252
    • What keeps Gene out of the bars
Re: java vs java3d and visolate.jar
« Reply #2 on: January 13, 2012, 10:18:22 PM »
This RepRapWiki page may help

I believe it did on the ubuntu-10.04 LTS machine, BUT its gfx is Intel i915, and it cannot do the 3d stuff.  ssh -Y'd into that box, I tried to run gnome-control-panel, and managed to screw up this machines kde prefs pretty bad.  I'm going to do a reset button reboot after I post this to see if I can recover on the reboot.

Anyway, the second line of that visolate fix threw a boat load of errors, but the rest of it down to the last line was un-eventful.

The last line, starting visolate, reports it can't open the 3d stuff, I presume for a preview display, spits out about 30 lines of other minor objections, probably because of the 3d error, and then hangs till I give it a ctl+c, at which point it exits normally.

The java setup on this pclos box seems completely different, so I have not tried that on this machine.
This is however an improvement, and possibly with an improved i915 driver, it might work.

Thank you very much for the help.

Cheers, Gene

Offline Almost-retired

  • Sr. Member
  • ****
  • Posts: 252
    • What keeps Gene out of the bars
Re: java vs java3d and visolate.jar
« Reply #3 on: January 16, 2012, 11:32:19 AM »
Answering my own stuffs here.

I did get it to work finally, with a lot of help from people much more versed in java gibberish than I.  The visolate sources were obtained and the .jar refactored to include the missing stuff that java apparently cannot find with a whole committees hands.  That new .jar, and a bash script to set some needed env stuff, and it working on this pclos box now.  Well enough I've found about 3 non-show-stopper buglets, so it will be usable.

What I did do was run it with strace, which ultimately was of little use except for the reduction in time between hitting the enter key, and the always the same roor exit message, was to create the whole path of the stuff it was looking for on the first miss, and crate a link from there to where that library actually was.  Each time I did that, I cut the execution time by about 1 second.  But I ran out of misses, so assuming strace wasn't recursively tracing the sub calls, another person familiar with java, located the src's and refactored the .jar file so it contained all the missing stuffs and emailed me a link to the newer version.

Then a script located in /usr/bin was carved out & called visolate:

#!/bin/bash
# change following path to the location of the two java3d .so files
export LD_LIBRARY_PATH=/etc/alternatives/jre
# change following path to the location of visolate.jar
java -jar /usr/share/java/visolate.jar

And it runs fine except for the buglets.

Thanks for the hints.  They were indeed helpful.

Cheers, Gene