can't run BEAST2 on macOS Sierra

273 views
Skip to first unread message

Lev Yampolsky

unread,
Feb 19, 2018, 12:25:02 AM2/19/18
to beast-users
Just downloaded BEAST2 and trying to run it on macOS Sierra 10.12.1 with java 9.0.4:

java --version

java 9.0.4

Java(TM) SE Runtime Environment (build 9.0.4+11)

Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)


Getting error messages from both BEAUti and BEAST: requires java 8, current version is 0, expect the unexpected. And nothing works.


Never had this problem with previous BEASTs on previous Macs. Should I install a legacy java 8? Not sure this is wise.

I vaguely remember a similar issue with some other soft with it not seeing the right java. Don't remember which and how it was resolved if it was.


Thanks in advance for any advise!




Remco Bouckaert

unread,
Feb 19, 2018, 12:29:58 AM2/19/18
to beast...@googlegroups.com
Hi Lev,

BEAST 2.4.* requires Java 8 and doesn't work with Java 9.

You can download it from oracle here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html or search for JDK8 download on the Oracle site.

Cheers,

Remco

-- 
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Lev Yampolsky

unread,
Feb 21, 2018, 9:28:08 AM2/21/18
to beast-users
Thanks!
Users in this situation also may find this useful: https://it.uoregon.edu/reverting-java-mac
I tried several command line recipes for reverting to java 8 and none worked, but this simple trick did.

Nick Matzke

unread,
Mar 29, 2018, 1:06:40 AM3/29/18
to beast-users
Hi all,

Posting my experience with this for google-ability / for my future self:

Just now, after installing Beast2, FigTree etc on a new iMac with OS X 10.13 / High Sierra, I had the following weirdness with FigTree:

After double-clicking it, it would appear to start opening, but then close without any message or any window appearing.

I installed JDK 8 from Oracle as instructed (via the .dmg), but the problem remained.

The solution seemed to be this:

===================
leave all JDKs at their default location, under /Library/Java/JavaVirtualMachines. The system will pick the highest version by default.

To exclude a JDK from being picked by default, rename its Contents/Info.plist to Info.plist.disabled. That JDK can still be used when $JAVA_HOME points to it, or explicitly referenced in a script or configuration. It will simply be ignored by system's java command.
System launcher will use the JDK with highest version among those that have an Info.plist file.

When working in a shell with alternate JDK, pick your method among existing answers (jenv, or custom aliases/scripts around /usr/libexec/java_home, etc).
===================

For me this meant:

# Checking installed versions
cd /Library/Java/JavaVirtualMachines/
ls

/usr/libexec/java_home -V

# Checking the version being used by default:

/usr/libexec/java_home

...returns Java 9...

/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home


# Go to the Contents folder for java 9:
cd /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents

# Change the Info.plist file:
sudo mv Info.plist Info.plist.disabled

# Now the new version is 1.8:
/usr/libexec/java_home
...returns...
/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home

After this, FigTree worked.  I suspect the Beast2.app will also but I may need to restart (currently I still get the following:

============
BEAST requires Java version 8
but the current version is 0.

You can get Java from https://www.java.com/

Continuing, but expect the unexpected.
============

...but I don't want to restart right now and have no immediate need so I won't work on it further for the moment).

Cheers,
Nick

Andrew Rambaut

unread,
Mar 29, 2018, 7:01:17 AM3/29/18
to beast...@googlegroups.com
As you suggest it isn't High Sierra that is the problem but Java 9.

For FigTree try this preview release:


This should work on Java 6, 8 or 9.

Andrew

Andrew Rambaut

unread,
Mar 29, 2018, 7:01:47 AM3/29/18
to beast...@googlegroups.com
As you suggest it isn't High Sierra that is the problem but Java 9.

For FigTree try this preview release:


This should work on Java 6, 8 or 9.

Andrew
On 29 Mar 2018, at 06:06, Nick Matzke <nickmat...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages