[ImageJ-devel] ImageJ with java 1.7?
Johannes Schindelin
Johannes.Schindelin at gmx.de
Sun Jun 2 10:50:09 CDT 2013
Hi Chris,
On Sun, 2 Jun 2013, Chris wrote:
> On May 31, 2013, at 9:42 AM, Curtis Rueden wrote:
>
> > > I can't find any way to download java 1.6 and have it as an option for
> > > running Netbeans.
> >
> > You can reinstall Java 6 on OS X. See e.g.:
> > http://stackoverflow.com/questions/13653597/jdk-6-on-mountain-lion
> >
> > You can verify which Javas are installed using this script:
> > https://github.com/ctrueden/ctr-scripts/blob/master/java-info
> >
> > You can configure which JDK NetBeans uses using the Tools > Platforms
> > menu command. Click "Add Platform" and choose the Contents/Home
> > subfolder of something in /Library/Java/JavaVirtualMachines (or maybe
> > /System/Library/Java/JavaVirtualMachines if the JDK in question is not
> > in the former folder).
>
> Thank you Curtis. I do have java 1.6 on my machine in
> System/Library/Java/JavaVirtualMachines/1.6.0.jdk, but I cannot add it
> to Netbeans. Choosing Add Platform in Tools>Java Platforms (there is no
> just "Platforms" in NetBeans IDE 7.3) results in this dialog:
>
> which doesn't allow me to do anything but cancel. The same holds true
> if I try this with NetBeans 7.2. I tried copying java 1.6.0.jdk to the
> same library where jdk1.7.0_21.jdk is located, but it still doesn't
> allow anything but "Cancel." So it seems I do not have the ability to
> change NetBeans java platform to 1.6.0.
Maybe there is something about "compatibility"? Even later JDKs will allow
you to target earlier versions. With javac, the option is "-target 1.5".
With Netbeans, I don't know.
This solves the class format problem, but of course it does not safeguard
you against using API that was not yet available in earlier Java versions
(e.g. java.io.File missing setExecutable(boolean), i.e. all the stuff that
is marked with something like "Since 1.6" in the javadocs).
Ciao,
Johannes
More information about the ImageJ-devel
mailing list