3D Viewer broken on Lion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

3D Viewer broken on Lion

Robert Dougherty
Dear All,

In using a reasonably new Mac OS X 10.7.5 Lion, the 3D viewer produces the error

(java.lang.NoClassDefFoundError: Could not initialize class javax.media.j3d.VirtualUniverse)

Java 7 is installed.  I thought this might be the problem and tried to revert to Java 6 using the terminal command at
http://support.apple.com/kb/HT5559?viewlocale=en_US
but this did not succeed in getting rid of Java 7.  Step 3 produced an error message "not a directory" or something like that.

How can I get the 3D viewer back?

Bob

Robert Dougherty, Ph.D.
President, OptiNav, Inc.
1414 127th Place NE #106
Bellevue, WA 98005
Tel. (425)891-4883
FAX (425)467-1119
www.optinav.com
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D Viewer broken on Lion

ctrueden
Hi Bob,

> Java 7 is installed.  I thought this might be the problem

Very likely. From what I have read, Java3D 1.5 does not work with Java 7 on
OS X 10.7 or 10.8.

> How can I get the 3D viewer back?

First of all, I am guessing you are using vanilla ImageJ rather than Fiji?
If so, please note that AFAIK, vanilla ImageJ does not ship with Java3D
bundled. So you might need to install it manually; on OS X, it is all
rather confusing. For this reason, the Fiji distribution of ImageJ actually
ships a known-working version of Java3D.

Also note that the version of Java3D which came preinstalled on older
versions of OS X is too old to work reliably with the 3D Viewer!

Anyway, if you do already have Java3D 1.5 set up, I know of two possible
solutions:

1) Use Java 6.

2) Use Harvey Harrison's pure-Java Java3D fork which uses JOGL2 behind the
scenes:
    http://stackoverflow.com/a/12810988/1207769

In the case of #2:
- For Fiji, replace the JARs shipped with Fiji in the
java/macosx-java3d/Home/lib/ext folder.
- For vanilla ImageJ, since it does not ship with Java3D at all, you are on
your own.

Personally I just use Java 6 on my 10.8 box, and all works fine with the
stock Java3D 1.5.

> tried to revert to Java 6 using the terminal command at
> http://support.apple.com/kb/HT5559?viewlocale=en_US
> but this did not succeed in getting rid of Java 7.

Well, the goal is not to get rid of Java 7, but rather make Java 6 the
default.

In case it helps, here is a script I wrote to inspect your Java
installations on OS X:
    https://github.com/ctrueden/ctr-scripts/blob/master/java-info

Please note that Fiji is supposed to use Java 6 in preference to Java 7 if
it exists on your system (due to stability issues with Java 7). Are you
sure you have a Java 6 installation at all?

If not, you can reinstall it:
  http://stackoverflow.com/q/13653597

Apple and Oracle certainly do not make it easy, though.

One last thing to try is to explicitly set your JAVA_HOME environment
variable to the Java 6 installation before launching Fiji.

Would be great to hear back from you about how/if you get it working.

Regards,
Curtis


On Tue, Aug 27, 2013 at 12:10 PM, Robert Dougherty <[hidden email]> wrote:

> Dear All,
>
> In using a reasonably new Mac OS X 10.7.5 Lion, the 3D viewer produces the
> error
>
> (java.lang.NoClassDefFoundError: Could not initialize class
> javax.media.j3d.VirtualUniverse)
>
> Java 7 is installed.  I thought this might be the problem and tried to
> revert to Java 6 using the terminal command at
> http://support.apple.com/kb/HT5559?viewlocale=en_US
> but this did not succeed in getting rid of Java 7.  Step 3 produced an
> error message "not a directory" or something like that.
>
> How can I get the 3D viewer back?
>
> Bob
>
> Robert Dougherty, Ph.D.
> President, OptiNav, Inc.
> 1414 127th Place NE #106
> Bellevue, WA 98005
> Tel. (425)891-4883
> FAX (425)467-1119
> www.optinav.com
> [hidden email]
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D Viewer broken on Lion

Kota Miura
In reply to this post by Robert Dougherty
Hi Bob,

Maybe add some lines in your .profile to enable switching your environment
between Java6 and Java7?

See a bit more details in the following link.

http://cmci.embl.de/documents/120329javatips#switch_between_java6_and_java7_osx

Cheers,
Kota


On Tue, Aug 27, 2013 at 7:10 PM, Robert Dougherty <[hidden email]> wrote:

> Dear All,
>
> In using a reasonably new Mac OS X 10.7.5 Lion, the 3D viewer produces the
> error
>
> (java.lang.NoClassDefFoundError: Could not initialize class
> javax.media.j3d.VirtualUniverse)
>
> Java 7 is installed.  I thought this might be the problem and tried to
> revert to Java 6 using the terminal command at
> http://support.apple.com/kb/HT5559?viewlocale=en_US
> but this did not succeed in getting rid of Java 7.  Step 3 produced an
> error message "not a directory" or something like that.
>
> How can I get the 3D viewer back?
>
> Bob
>
> Robert Dougherty, Ph.D.
> President, OptiNav, Inc.
> 1414 127th Place NE #106
> Bellevue, WA 98005
> Tel. (425)891-4883
> FAX (425)467-1119
> www.optinav.com
> [hidden email]
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--

-------------------------------------------------------------*Dr. Kota Miura*

Scientist & IT Engineer
Centre for Molecular and Cellular Imaging,
European Molecular Biology Laboratory
Meyerhofstr. 1
69117 Heidelberg
GERMANY

Tel +49 6221 387 404

Mobile +49 160 95001177

Fax +49 6221 387 512

http://cmci.embl.de
-------------------------------------------------------------

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html