-
Notifications
You must be signed in to change notification settings - Fork 19
GenePattern macOS Setup Guide
The GenePattern team recommends using the (docker installation on modern Macs)[https://github.com/genepattern/genepattern-server/wiki/Running-GenePattern-in-a-Docker-Container]. However if you wish to continue using the This guide helps get the GenePattern mac app working for MacOS Sonoma and later builds.
Install a Java 1.8 JVM. The recommended option is Zulu 8 (native arm64):
- Download from: https://www.azul.com/downloads/?version=java-8&os=macos&architecture=arm-64-bit&package=jdk
- Install the
.dmgand verify with:Confirm/usr/libexec/java_home -V
zulu-8.jdkappears in the list.
macOS will block GenePattern on first launch because it is not notarized.
- Open System Settings → Privacy & Security
- Scroll to the Security section
- Click Open Anyway next to the GenePattern warning
- Confirm when prompted
If "Open Anyway" doesn't appear, right-click the app in Finder → Open to force the dialog.
GenePattern's launch script sets JAVA_HOME to Java 1.8 but then ignores it by finding the system java in PATH first. Edit the script to check JAVA_HOME first.
sudo nano /Applications/GenePattern.app/Contents/MacOS/GenePatternFind this block:
if type -p java; then
echo found java executable in PATH
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; thenReplace it with:
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo found java executable in JAVA_HOME
_java="$JAVA_HOME/bin/java"
elif type -p java; then
echo found java executable in PATH
_java=java
elifSave: Ctrl+O → Enter → Ctrl+X
Create a setenv.sh file that Tomcat automatically sources at startup, hardcoding the Zulu 8 JVM:
cat > /Applications/GenePattern.app/Contents/Resources/GenePatternServer/Tomcat/bin/setenv.sh << 'EOF'
#!/bin/bash
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
export JRE_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
EOF
chmod +x /Applications/GenePattern.app/Contents/Resources/GenePatternServer/Tomcat/bin/setenv.shDouble-click GenePattern.app — it should now launch correctly, start Tomcat with Java 1.8, and open your browser to http://127.0.0.1:8080/gp.
Still seeing the -Djava.endorsed.dirs error?
Verify Zulu 8 is installed and visible:
/usr/libexec/java_home -VConfirm /Library/Java/JavaVirtualMachines/zulu-8.jdk appears. If not, reinstall Zulu 8.
GenePattern opens but browser doesn't load?
Wait a few extra seconds — Tomcat can take 10–15 seconds to start. Then manually open http://127.0.0.1:8080/gp.