Posted by
dscho on
Sep 17, 2013; 2:41pm
URL: http://imagej.273.s1.nabble.com/How-to-change-Java-version-for-ImageJ64-in-Mac-OSX-tp5004827p5004829.html
Hi Fernando,
On Tue, 17 Sep 2013, Fernando Sales wrote:
> I've been developing plugins using Eclipse, which is using java 1.7 for
> compiling them (Mac OSX default). Additionally, I've been using a Mac IJ
> distribution to test my plugins outside Eclipse environment, in order to
> avoid problems of compatibility.
There are serious implications in requiring Java 1.7 for your plugin.
Unless you know exactly which users you want to restrict that plugin to,
you should avoid using Java 1.7.
Just to list a couple of downsides from adopting Java 1.7 prematurely: it
is not supported on most of the Macs found in the wild (MacOSX 10.7+ is
required, thanks to the ingenious changes Apple forced into OpenJDK7, and
MacOSX 10.7 and 10.8 cover only about 40% of all installations at the
moment). Additionally, Java 1.7 still displays a lot of childhood diseases
(last time I checked, Java 1.7 on Linux crashed randomly on me within the
first few minutes of heavy number crunching).
Having said that, you are free to require whichever Java version you like
for your plugin, of course...
> However, Image64 from Mac OSX IJ version, uses java 1.6.0_51 and my plugins
> are presenting this error message:
> "java.lang.UnsupportedClassVersionError: virtualhistology/VH_Loader :
> Unsupported major.minor version 51.0
>
> This plugin requires Java 1.7 or later."
>
> I've already changed the JRE version to 1.7.0 in Java Preferences Menu from
> System Preferences but the error messages still appearing.
>
> Is possible to change change JRE version inside Image64 from Mac?
I do not know exactly which switch to change, in particular because it is
not quite clear whether you use the grand unified ImageJ launcher or not.
You can test things in ImageJ with whatever Java you see fit, however, by
launching it from the command-line:
java -jar /Applications/ImageJ64.app/ij.jar
Hth,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html