Skip to content

GenePattern macOS Setup Guide

liefeld edited this page May 1, 2026 · 3 revisions

GenePattern macOS Setup Guide

The GenePattern team recommends using the Docker installation. However if you wish to continue using the This guide helps get the GenePattern mac app working for MacOS Sonoma and later builds.

Prerequisites

Install a Java 1.8 JVM. The recommended option is Zulu 8 (native arm64):


Step 1: Bypass Gatekeeper

macOS will block GenePattern on first launch because it is not notarized.

  1. Open System SettingsPrivacy & Security
  2. Scroll to the Security section
  3. Click Open Anyway next to the GenePattern warning
  4. Confirm when prompted

If "Open Anyway" doesn't appear, right-click the app in Finder → Open to force the dialog.


Step 2: Fix the Java Launcher

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/GenePattern

Find this block:

if type -p java; then
    echo found java executable in PATH
    _java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]];  then

Replace 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
elif

Save: Ctrl+O → Enter → Ctrl+X


Step 3: Pin Tomcat to Java 1.8

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.sh

Step 4: Launch GenePattern

Double-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.


Troubleshooting

Still seeing the -Djava.endorsed.dirs error?
Verify Zulu 8 is installed and visible:

/usr/libexec/java_home -V

Confirm /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.

Clone this wiki locally