Running Fiji with Java 8 on OSX Yosemite

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

Running Fiji with Java 8 on OSX Yosemite

lechristophe
Hi,

Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
lovely Sunday so why not?), seeing that a lot of effort was made to make it
run better. However I ailed to do so. I used the instructions there:
http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F

- I started with a "clean" system with just Apple Java 6 "system" install
(the one I was using for Fiji so far, displaying Java 1.6.0_65 when
launched)
- Installed a fresh Fiji from Fiji.sc website in my Applications folder,
updated it
- Installed the Java 8 jre, and jdk just to be sure
- Even after reboot, when I launch Fiji it uses Java 6 (displays Java
1.6.0_65).

I then tried to directly point to the Java 8 install by following these
instructions:
http://fiji.sc/Frequently_Asked_Questions#On_OS_X

So in the Terminal I type (because I think there is an error in the Fiji
wiki, it should say Fiji.app not ImageJ.app in the command):

/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
  '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'

But I get the following error:

Mac-60f81dc34d74:~ christo$
/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
'/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'

Could not load Java library
'/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
1): image not found

Warning: falling back to System JVM
From the mailing messages it seems that people have trouble using Java 6
when they have Java 8 installed, not the other way around ! Is this a bug
(I will file a report if so) or is there something wrong with my system or
the way I try to do things?

Thanks for your help,

Christophe

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

Re: Running Fiji with Java 8 on OSX Yosemite

Aryeh Weiss
Here is what worked for me.

I downloaded the jdk from
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
and installed it (ie I ran the installer and let it install itself). It
was put in to
/Library/Java/JavaVirtualMachines
the current version is
jdk1.8.0_60.jdk

I erased the other JDK (1.8.0_51), and then Fiji found the new Java
automatically upon startup.
There is probably a better way to do it, but this worked for me.
When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
1.8.0_60 solved the problem.

--aryeh

On 9/20/15 10:30 AM, Christophe Leterrier wrote:

> Hi,
>
> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
> lovely Sunday so why not?), seeing that a lot of effort was made to make it
> run better. However I ailed to do so. I used the instructions there:
> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
>
> - I started with a "clean" system with just Apple Java 6 "system" install
> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
> launched)
> - Installed a fresh Fiji from Fiji.sc website in my Applications folder,
> updated it
> - Installed the Java 8 jre, and jdk just to be sure
> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
> 1.6.0_65).
>
> I then tried to directly point to the Java 8 install by following these
> instructions:
> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
>
> So in the Terminal I type (because I think there is an error in the Fiji
> wiki, it should say Fiji.app not ImageJ.app in the command):
>
> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
>    '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>
> But I get the following error:
>
> Mac-60f81dc34d74:~ christo$
> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>
> Could not load Java library
> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
> 1): image not found
>
> Warning: falling back to System JVM
> >From the mailing messages it seems that people have trouble using Java 6
> when they have Java 8 installed, not the other way around ! Is this a bug
> (I will file a report if so) or is there something wrong with my system or
> the way I try to do things?
>
> Thanks for your help,
>
> Christophe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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

Re: Running Fiji with Java 8 on OSX Yosemite

lechristophe
This is similar to what I did: remove all jdks from the VirtualMachines
folder, let the 1.8.0_60 install itself, but then Fiji does not pick it up.
Are you using Fiji or ImageJ?

Christophe
Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]> a écrit :

> Here is what worked for me.
>
> I downloaded the jdk from
>
> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
> and installed it (ie I ran the installer and let it install itself). It
> was put in to
> /Library/Java/JavaVirtualMachines
> the current version is
> jdk1.8.0_60.jdk
>
> I erased the other JDK (1.8.0_51), and then Fiji found the new Java
> automatically upon startup.
> There is probably a better way to do it, but this worked for me.
> When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
> 1.8.0_60 solved the problem.
>
> --aryeh
>
> On 9/20/15 10:30 AM, Christophe Leterrier wrote:
>
>> Hi,
>>
>> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
>> lovely Sunday so why not?), seeing that a lot of effort was made to make
>> it
>> run better. However I ailed to do so. I used the instructions there:
>>
>> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
>>
>> - I started with a "clean" system with just Apple Java 6 "system" install
>> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
>> launched)
>> - Installed a fresh Fiji from Fiji.sc website in my Applications folder,
>> updated it
>> - Installed the Java 8 jre, and jdk just to be sure
>> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
>> 1.6.0_65).
>>
>> I then tried to directly point to the Java 8 install by following these
>> instructions:
>> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
>>
>> So in the Terminal I type (because I think there is an error in the Fiji
>> wiki, it should say Fiji.app not ImageJ.app in the command):
>>
>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
>>    '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>
>> But I get the following error:
>>
>> Mac-60f81dc34d74:~ christo$
>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>
>> Could not load Java library
>>
>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
>>
>> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
>> 1): image not found
>>
>> Warning: falling back to System JVM
>> >From the mailing messages it seems that people have trouble using Java 6
>> when they have Java 8 installed, not the other way around ! Is this a bug
>> (I will file a report if so) or is there something wrong with my system or
>> the way I try to do things?
>>
>> Thanks for your help,
>>
>> Christophe
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
>

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

Re: Running Fiji with Java 8 on OSX Yosemite

Aryeh Weiss
On 9/20/15 12:30 PM, Christophe Leterrier wrote:
>
> This is similar to what I did: remove all jdks from the
> VirtualMachines folder, let the 1.8.0_60 install itself, but then Fiji
> does not pick it up. Are you using Fiji or ImageJ?
>

I am using Fiji.
--aryeh

> Christophe
>
> Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]
> <mailto:[hidden email]>> a écrit :
>
>     Here is what worked for me.
>
>     I downloaded the jdk from
>     http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
>     and installed it (ie I ran the installer and let it install
>     itself). It was put in to
>     /Library/Java/JavaVirtualMachines
>     the current version is
>     jdk1.8.0_60.jdk
>
>     I erased the other JDK (1.8.0_51), and then Fiji found the new
>     Java automatically upon startup.
>     There is probably a better way to do it, but this worked for me.
>     When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading
>     to 1.8.0_60 solved the problem.
>
>     --aryeh
>
>     On 9/20/15 10:30 AM, Christophe Leterrier wrote:
>
>         Hi,
>
>         Today I want to try to run Fiji under Java 8 with OSX Yosemite
>         (it's a
>         lovely Sunday so why not?), seeing that a lot of effort was
>         made to make it
>         run better. However I ailed to do so. I used the instructions
>         there:
>         http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
>
>         - I started with a "clean" system with just Apple Java 6
>         "system" install
>         (the one I was using for Fiji so far, displaying Java 1.6.0_65
>         when
>         launched)
>         - Installed a fresh Fiji from Fiji.sc website in my
>         Applications folder,
>         updated it
>         - Installed the Java 8 jre, and jdk just to be sure
>         - Even after reboot, when I launch Fiji it uses Java 6
>         (displays Java
>         1.6.0_65).
>
>         I then tried to directly point to the Java 8 install by
>         following these
>         instructions:
>         http://fiji.sc/Frequently_Asked_Questions#On_OS_X
>
>         So in the Terminal I type (because I think there is an error
>         in the Fiji
>         wiki, it should say Fiji.app not ImageJ.app in the command):
>
>         /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
>          '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>
>         But I get the following error:
>
>         Mac-60f81dc34d74:~ christo$
>         /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
>         '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>
>         Could not load Java library
>         '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
>         dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
>         1): image not found
>
>         Warning: falling back to System JVM
>         >From the mailing messages it seems that people have trouble
>         using Java 6
>         when they have Java 8 installed, not the other way around ! Is
>         this a bug
>         (I will file a report if so) or is there something wrong with
>         my system or
>         the way I try to do things?
>
>         Thanks for your help,
>
>         Christophe
>
>         --
>         ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


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

Re: Running Fiji with Java 8 on OSX Yosemite

John Minter
In reply to this post by lechristophe
On Mac OSX you can always create a custom launcher that solves the problem.
This is nice because you can have multiple launchers that use the same Fiji
(or ImageJ) installation but use different JVMs (nice when there is a bug
that causes issues with your workflow when you use a specific JVM.)

Make one like this

Open the Script Editor

Choose New > From Template > Cocoa-Applescript Applet.app

My applet code for Java 8 is shown below:

-- begin code

*do shell script* "/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
-Dpython.cachedir.skip=false --java-home
'/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home' --"

*quit* *me*

-- end code

You can even create a custom icon. I made some for Fiji with Java 6, 7 8.
You can find them here. Made for old eyes that like simple, clean icons for
my Dock at the bottom of the screen.


https://github.com/jrminter/OSImageAnalysis/tree/master/ImageJ/icons

Use the .icns files for MacOSX (.ico for Windows)






On Sun, Sep 20, 2015 at 5:30 AM, Christophe Leterrier <
[hidden email]> wrote:

> This is similar to what I did: remove all jdks from the VirtualMachines
> folder, let the 1.8.0_60 install itself, but then Fiji does not pick it up.
> Are you using Fiji or ImageJ?
>
> Christophe
> Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]> a écrit :
>
> > Here is what worked for me.
> >
> > I downloaded the jdk from
> >
> >
> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
> > and installed it (ie I ran the installer and let it install itself). It
> > was put in to
> > /Library/Java/JavaVirtualMachines
> > the current version is
> > jdk1.8.0_60.jdk
> >
> > I erased the other JDK (1.8.0_51), and then Fiji found the new Java
> > automatically upon startup.
> > There is probably a better way to do it, but this worked for me.
> > When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
> > 1.8.0_60 solved the problem.
> >
> > --aryeh
> >
> > On 9/20/15 10:30 AM, Christophe Leterrier wrote:
> >
> >> Hi,
> >>
> >> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
> >> lovely Sunday so why not?), seeing that a lot of effort was made to make
> >> it
> >> run better. However I ailed to do so. I used the instructions there:
> >>
> >>
> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
> >>
> >> - I started with a "clean" system with just Apple Java 6 "system"
> install
> >> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
> >> launched)
> >> - Installed a fresh Fiji from Fiji.sc website in my Applications folder,
> >> updated it
> >> - Installed the Java 8 jre, and jdk just to be sure
> >> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
> >> 1.6.0_65).
> >>
> >> I then tried to directly point to the Java 8 install by following these
> >> instructions:
> >> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
> >>
> >> So in the Terminal I type (because I think there is an error in the Fiji
> >> wiki, it should say Fiji.app not ImageJ.app in the command):
> >>
> >> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
> >>    '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
> >>
> >> But I get the following error:
> >>
> >> Mac-60f81dc34d74:~ christo$
> >> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
> >> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
> >>
> >> Could not load Java library
> >>
> >>
> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
> >>
> >>
> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
> >> 1): image not found
> >>
> >> Warning: falling back to System JVM
> >> >From the mailing messages it seems that people have trouble using Java
> 6
> >> when they have Java 8 installed, not the other way around ! Is this a
> bug
> >> (I will file a report if so) or is there something wrong with my system
> or
> >> the way I try to do things?
> >>
> >> Thanks for your help,
> >>
> >> Christophe
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >>
> >
> > --
> > Aryeh Weiss
> > Faculty of Engineering
> > Bar Ilan University
> > Ramat Gan 52900 Israel
> >
> > Ph:  972-3-5317638
> > FAX: 972-3-7384051
> >
> >
>
> --
> 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: Running Fiji with Java 8 on OSX Yosemite

lechristophe
When I do custom launch from the Terminal it does not work (see my original
message). It does not find what it wants in
JavaVirtualMachines/jdk1.8.0_80.jdk/ although I installed using Oracle
install process.

I will make shortcuts to have different versions but first I have to get
the 1.8 version to launch...
Le 20 sept. 2015 2:36 PM, "John Minter" <[hidden email]> a écrit :

> On Mac OSX you can always create a custom launcher that solves the problem.
> This is nice because you can have multiple launchers that use the same Fiji
> (or ImageJ) installation but use different JVMs (nice when there is a bug
> that causes issues with your workflow when you use a specific JVM.)
>
> Make one like this
>
> Open the Script Editor
>
> Choose New > From Template > Cocoa-Applescript Applet.app
>
> My applet code for Java 8 is shown below:
>
> -- begin code
>
> *do shell script* "/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
> -Dpython.cachedir.skip=false --java-home
> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home' --"
>
> *quit* *me*
>
> -- end code
>
> You can even create a custom icon. I made some for Fiji with Java 6, 7 8.
> You can find them here. Made for old eyes that like simple, clean icons for
> my Dock at the bottom of the screen.
>
>
> https://github.com/jrminter/OSImageAnalysis/tree/master/ImageJ/icons
>
> Use the .icns files for MacOSX (.ico for Windows)
>
>
>
>
>
>
> On Sun, Sep 20, 2015 at 5:30 AM, Christophe Leterrier <
> [hidden email]> wrote:
>
> > This is similar to what I did: remove all jdks from the VirtualMachines
> > folder, let the 1.8.0_60 install itself, but then Fiji does not pick it
> up.
> > Are you using Fiji or ImageJ?
> >
> > Christophe
> > Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]> a écrit :
> >
> > > Here is what worked for me.
> > >
> > > I downloaded the jdk from
> > >
> > >
> >
> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
> > > and installed it (ie I ran the installer and let it install itself). It
> > > was put in to
> > > /Library/Java/JavaVirtualMachines
> > > the current version is
> > > jdk1.8.0_60.jdk
> > >
> > > I erased the other JDK (1.8.0_51), and then Fiji found the new Java
> > > automatically upon startup.
> > > There is probably a better way to do it, but this worked for me.
> > > When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
> > > 1.8.0_60 solved the problem.
> > >
> > > --aryeh
> > >
> > > On 9/20/15 10:30 AM, Christophe Leterrier wrote:
> > >
> > >> Hi,
> > >>
> > >> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
> > >> lovely Sunday so why not?), seeing that a lot of effort was made to
> make
> > >> it
> > >> run better. However I ailed to do so. I used the instructions there:
> > >>
> > >>
> >
> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
> > >>
> > >> - I started with a "clean" system with just Apple Java 6 "system"
> > install
> > >> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
> > >> launched)
> > >> - Installed a fresh Fiji from Fiji.sc website in my Applications
> folder,
> > >> updated it
> > >> - Installed the Java 8 jre, and jdk just to be sure
> > >> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
> > >> 1.6.0_65).
> > >>
> > >> I then tried to directly point to the Java 8 install by following
> these
> > >> instructions:
> > >> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
> > >>
> > >> So in the Terminal I type (because I think there is an error in the
> Fiji
> > >> wiki, it should say Fiji.app not ImageJ.app in the command):
> > >>
> > >> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
> > >>    '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
> > >>
> > >> But I get the following error:
> > >>
> > >> Mac-60f81dc34d74:~ christo$
> > >> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
> > >> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
> > >>
> > >> Could not load Java library
> > >>
> > >>
> >
> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
> > >>
> > >>
> >
> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
> > >> 1): image not found
> > >>
> > >> Warning: falling back to System JVM
> > >> >From the mailing messages it seems that people have trouble using
> Java
> > 6
> > >> when they have Java 8 installed, not the other way around ! Is this a
> > bug
> > >> (I will file a report if so) or is there something wrong with my
> system
> > or
> > >> the way I try to do things?
> > >>
> > >> Thanks for your help,
> > >>
> > >> Christophe
> > >>
> > >> --
> > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> > >>
> > >>
> > >
> > > --
> > > Aryeh Weiss
> > > Faculty of Engineering
> > > Bar Ilan University
> > > Ramat Gan 52900 Israel
> > >
> > > Ph:  972-3-5317638
> > > FAX: 972-3-7384051
> > >
> > >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> 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: Running Fiji with Java 8 on OSX Yosemite

Aryeh Weiss
On 9/20/15 3:45 PM, Christophe Leterrier wrote:
> When I do custom launch from the Terminal it does not work (see my original
> message). It does not find what it wants in
> JavaVirtualMachines/jdk1.8.0_80.jdk/ although I installed using Oracle
> install process.
>
> I will make shortcuts to have different versions but first I have to get
> the 1.8 version to launch...
> Le 20 sept. 2015 2:36 PM, "John Minter" <[hidden email]> a écrit :
A while ago MArk Hiner posted  a shell script that allows me to launch
Fiji with Java 1.6. I modified it to launch
with Java 1.8.

export J8="$(/usr/libexec/java_home -v 1.8)"
export IJ_HOME=/Applications/local/fiji/Fiji.app
  $J8/bin/$($IJ_HOME/Contents/MacOS/ImageJ-macosx --dry-run | sed 's/
-Djava.ext.dirs=[^ ]*//')

and I checked that it works on my system
the line
/usr/libexec/java_home -v 1.8
will enable you to see where it thinks that your java resides.
You may have to change the path in IJ_HOME

Hope this helps
--aryeh

>> On Mac OSX you can always create a custom launcher that solves the problem.
>> This is nice because you can have multiple launchers that use the same Fiji
>> (or ImageJ) installation but use different JVMs (nice when there is a bug
>> that causes issues with your workflow when you use a specific JVM.)
>>
>> Make one like this
>>
>> Open the Script Editor
>>
>> Choose New > From Template > Cocoa-Applescript Applet.app
>>
>> My applet code for Java 8 is shown below:
>>
>> -- begin code
>>
>> *do shell script* "/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
>> -Dpython.cachedir.skip=false --java-home
>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home' --"
>>
>> *quit* *me*
>>
>> -- end code
>>
>> You can even create a custom icon. I made some for Fiji with Java 6, 7 8.
>> You can find them here. Made for old eyes that like simple, clean icons for
>> my Dock at the bottom of the screen.
>>
>>
>> https://github.com/jrminter/OSImageAnalysis/tree/master/ImageJ/icons
>>
>> Use the .icns files for MacOSX (.ico for Windows)
>>
>>
>>
>>
>>
>>
>> On Sun, Sep 20, 2015 at 5:30 AM, Christophe Leterrier <
>> [hidden email]> wrote:
>>
>>> This is similar to what I did: remove all jdks from the VirtualMachines
>>> folder, let the 1.8.0_60 install itself, but then Fiji does not pick it
>> up.
>>> Are you using Fiji or ImageJ?
>>>
>>> Christophe
>>> Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]> a écrit :
>>>
>>>> Here is what worked for me.
>>>>
>>>> I downloaded the jdk from
>>>>
>>>>
>> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
>>>> and installed it (ie I ran the installer and let it install itself). It
>>>> was put in to
>>>> /Library/Java/JavaVirtualMachines
>>>> the current version is
>>>> jdk1.8.0_60.jdk
>>>>
>>>> I erased the other JDK (1.8.0_51), and then Fiji found the new Java
>>>> automatically upon startup.
>>>> There is probably a better way to do it, but this worked for me.
>>>> When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
>>>> 1.8.0_60 solved the problem.
>>>>
>>>> --aryeh
>>>>
>>>> On 9/20/15 10:30 AM, Christophe Leterrier wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
>>>>> lovely Sunday so why not?), seeing that a lot of effort was made to
>> make
>>>>> it
>>>>> run better. However I ailed to do so. I used the instructions there:
>>>>>
>>>>>
>> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
>>>>> - I started with a "clean" system with just Apple Java 6 "system"
>>> install
>>>>> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
>>>>> launched)
>>>>> - Installed a fresh Fiji from Fiji.sc website in my Applications
>> folder,
>>>>> updated it
>>>>> - Installed the Java 8 jre, and jdk just to be sure
>>>>> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
>>>>> 1.6.0_65).
>>>>>
>>>>> I then tried to directly point to the Java 8 install by following
>> these
>>>>> instructions:
>>>>> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
>>>>>
>>>>> So in the Terminal I type (because I think there is an error in the
>> Fiji
>>>>> wiki, it should say Fiji.app not ImageJ.app in the command):
>>>>>
>>>>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
>>>>>     '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>>>>
>>>>> But I get the following error:
>>>>>
>>>>> Mac-60f81dc34d74:~ christo$
>>>>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
>>>>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>>>>
>>>>> Could not load Java library
>>>>>
>>>>>
>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
>>>>>
>> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
>>>>> 1): image not found
>>>>>
>>>>> Warning: falling back to System JVM
>>>>> >From the mailing messages it seems that people have trouble using
>> Java
>>> 6
>>>>> when they have Java 8 installed, not the other way around ! Is this a
>>> bug
>>>>> (I will file a report if so) or is there something wrong with my
>> system
>>> or
>>>>> the way I try to do things?
>>>>>
>>>>> Thanks for your help,
>>>>>
>>>>> Christophe
>>>>>
>>>>> --
>>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>>
>>>>>
>>>> --
>>>> Aryeh Weiss
>>>> Faculty of Engineering
>>>> Bar Ilan University
>>>> Ramat Gan 52900 Israel
>>>>
>>>> Ph:  972-3-5317638
>>>> FAX: 972-3-7384051
>>>>
>>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>


--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

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

Re: Running Fiji with Java 8 on OSX Yosemite

lechristophe
Hi Aryeh,

Thanks for this, I saw the script on Fiji's wiki but did not try it (as it
was to run Java 6). It actually works to run Java 8, so that's great. I
still don't understand why the regular command throws the error though...

Thanks again,

Christophe

On 20 September 2015 at 15:21, Aryeh Weiss <[hidden email]> wrote:

> On 9/20/15 3:45 PM, Christophe Leterrier wrote:
>
>> When I do custom launch from the Terminal it does not work (see my
>> original
>> message). It does not find what it wants in
>> JavaVirtualMachines/jdk1.8.0_80.jdk/ although I installed using Oracle
>> install process.
>>
>> I will make shortcuts to have different versions but first I have to get
>> the 1.8 version to launch...
>> Le 20 sept. 2015 2:36 PM, "John Minter" <[hidden email]> a écrit :
>>
> A while ago MArk Hiner posted  a shell script that allows me to launch
> Fiji with Java 1.6. I modified it to launch
> with Java 1.8.
>
> export J8="$(/usr/libexec/java_home -v 1.8)"
> export IJ_HOME=/Applications/local/fiji/Fiji.app
>  $J8/bin/$($IJ_HOME/Contents/MacOS/ImageJ-macosx --dry-run | sed 's/
> -Djava.ext.dirs=[^ ]*//')
>
> and I checked that it works on my system
> the line
> /usr/libexec/java_home -v 1.8
> will enable you to see where it thinks that your java resides.
> You may have to change the path in IJ_HOME
>
> Hope this helps
> --aryeh
>
>
> On Mac OSX you can always create a custom launcher that solves the problem.
>>> This is nice because you can have multiple launchers that use the same
>>> Fiji
>>> (or ImageJ) installation but use different JVMs (nice when there is a bug
>>> that causes issues with your workflow when you use a specific JVM.)
>>>
>>> Make one like this
>>>
>>> Open the Script Editor
>>>
>>> Choose New > From Template > Cocoa-Applescript Applet.app
>>>
>>> My applet code for Java 8 is shown below:
>>>
>>> -- begin code
>>>
>>> *do shell script* "/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
>>> -Dpython.cachedir.skip=false --java-home
>>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home' --"
>>>
>>> *quit* *me*
>>>
>>> -- end code
>>>
>>> You can even create a custom icon. I made some for Fiji with Java 6, 7 8.
>>> You can find them here. Made for old eyes that like simple, clean icons
>>> for
>>> my Dock at the bottom of the screen.
>>>
>>>
>>> https://github.com/jrminter/OSImageAnalysis/tree/master/ImageJ/icons
>>>
>>> Use the .icns files for MacOSX (.ico for Windows)
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Sep 20, 2015 at 5:30 AM, Christophe Leterrier <
>>> [hidden email]> wrote:
>>>
>>> This is similar to what I did: remove all jdks from the VirtualMachines
>>>> folder, let the 1.8.0_60 install itself, but then Fiji does not pick it
>>>>
>>> up.
>>>
>>>> Are you using Fiji or ImageJ?
>>>>
>>>> Christophe
>>>> Le 20 sept. 2015 11:17 AM, "Aryeh Weiss" <[hidden email]> a écrit
>>>> :
>>>>
>>>> Here is what worked for me.
>>>>>
>>>>> I downloaded the jdk from
>>>>>
>>>>>
>>>>>
>>> http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
>>>
>>>> and installed it (ie I ran the installer and let it install itself). It
>>>>> was put in to
>>>>> /Library/Java/JavaVirtualMachines
>>>>> the current version is
>>>>> jdk1.8.0_60.jdk
>>>>>
>>>>> I erased the other JDK (1.8.0_51), and then Fiji found the new Java
>>>>> automatically upon startup.
>>>>> There is probably a better way to do it, but this worked for me.
>>>>> When I had 1.8.0_51, File>New>System Clipboard failed. Upgrading to
>>>>> 1.8.0_60 solved the problem.
>>>>>
>>>>> --aryeh
>>>>>
>>>>> On 9/20/15 10:30 AM, Christophe Leterrier wrote:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> Today I want to try to run Fiji under Java 8 with OSX Yosemite (it's a
>>>>>> lovely Sunday so why not?), seeing that a lot of effort was made to
>>>>>>
>>>>> make
>>>
>>>> it
>>>>>> run better. However I ailed to do so. I used the instructions there:
>>>>>>
>>>>>>
>>>>>>
>>> http://imagej.net/Frequently_Asked_Questions#How_do_I_run_ImageJ_on_Yosemite.3F
>>>
>>>> - I started with a "clean" system with just Apple Java 6 "system"
>>>>>>
>>>>> install
>>>>
>>>>> (the one I was using for Fiji so far, displaying Java 1.6.0_65 when
>>>>>> launched)
>>>>>> - Installed a fresh Fiji from Fiji.sc website in my Applications
>>>>>>
>>>>> folder,
>>>
>>>> updated it
>>>>>> - Installed the Java 8 jre, and jdk just to be sure
>>>>>> - Even after reboot, when I launch Fiji it uses Java 6 (displays Java
>>>>>> 1.6.0_65).
>>>>>>
>>>>>> I then tried to directly point to the Java 8 install by following
>>>>>>
>>>>> these
>>>
>>>> instructions:
>>>>>> http://fiji.sc/Frequently_Asked_Questions#On_OS_X
>>>>>>
>>>>>> So in the Terminal I type (because I think there is an error in the
>>>>>>
>>>>> Fiji
>>>
>>>> wiki, it should say Fiji.app not ImageJ.app in the command):
>>>>>>
>>>>>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home \
>>>>>>     '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>>>>>
>>>>>> But I get the following error:
>>>>>>
>>>>>> Mac-60f81dc34d74:~ christo$
>>>>>> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx --java-home
>>>>>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home'
>>>>>>
>>>>>> Could not load Java library
>>>>>>
>>>>>>
>>>>>>
>>> '/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib':
>>>
>>>>
>>>>>>
>>> dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/../Libraries/libserver.dylib,
>>>
>>>> 1): image not found
>>>>>>
>>>>>> Warning: falling back to System JVM
>>>>>> >From the mailing messages it seems that people have trouble using
>>>>>>
>>>>> Java
>>>
>>>> 6
>>>>
>>>>> when they have Java 8 installed, not the other way around ! Is this a
>>>>>>
>>>>> bug
>>>>
>>>>> (I will file a report if so) or is there something wrong with my
>>>>>>
>>>>> system
>>>
>>>> or
>>>>
>>>>> the way I try to do things?
>>>>>>
>>>>>> Thanks for your help,
>>>>>>
>>>>>> Christophe
>>>>>>
>>>>>> --
>>>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>>>
>>>>>>
>>>>>> --
>>>>> Aryeh Weiss
>>>>> Faculty of Engineering
>>>>> Bar Ilan University
>>>>> Ramat Gan 52900 Israel
>>>>>
>>>>> Ph:  972-3-5317638
>>>>> FAX: 972-3-7384051
>>>>>
>>>>>
>>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>>
>>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>
> --
> Aryeh Weiss
> Faculty of Engineering
> Bar Ilan University
> Ramat Gan 52900 Israel
>
> Ph:  972-3-5317638
> FAX: 972-3-7384051
>
>

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