Skip to content

About

DrJava for Mac with Java 8 built in: one-click download, sharp on Retina, compile and run Java right away.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

DrJava icon

DrJava for Mac

DrJava, the Java editor many university courses use, packaged for today's Macs. Java 8 is built in, compiling works, and text is sharp on Retina screens. Download it, drag it to Applications, allow it once, and you're writing Java.

Download DrJava for Mac
One click downloads DrJava-for-Mac.zip (72 MB). macOS 10.13 or later; Apple silicon has Java 8 built in.

Install

Watch the two-minute walkthrough: DrJava on a Mac in two minutes!

  1. Download DrJava-for-Mac.zip and double-click it. Your Mac unzips it for you.
  2. Open the DrJava for Mac folder and drag DrJava into Applications.
  3. Open DrJava. The first time, macOS says "DrJava" Not Opened, because the app isn't notarized by Apple. Click Done.
  4. Open System Settings → Privacy & Security, scroll down, click Open Anyway next to the message about DrJava, and confirm with Touch ID or your password.

You only do this once; after that DrJava opens like any other app. On macOS 14 or older, right-click DrJava and choose Open instead of step 4.

Intel Macs

The Java 8 inside the app is for Apple silicon (M1 and newer). On an Intel Mac, install Amazon Corretto 8 for macOS x64 first. DrJava finds it by itself.

What's different from the official download

DrJava's last release (drjava-beta-20190813-220051) needs Java 8 and was made before Apple silicon. On a new Mac it has four problems, and this build fixes each one:

  • Java 8 is inside the app (Amazon Corretto 8.504.04.1). DrJava doesn't work with Java 9 or later, and new Macs don't come with Java at all.
  • Compile actually works. Without a separate JDK, DrJava's built-in compiler is pointed at the wrong core library, so it says "Compilation completed." without making a .class file, and Run then complains the document is out of sync. The launcher hands the compiler Java 8's real library.
  • Sharp text on Retina screens. On recent macOS, Java 8 can't tell which screen it is on, so it draws at half resolution and DrJava looks blurry. The launcher fixes that before Java starts.
  • The debugger stays private. With Java 8, DrJava's debugger port listens on every network your Mac is on. This build keeps it on 127.0.0.1.

If DrJava won't open, its log is at ~/Library/Logs/DrJava.log.

Build it yourself

You need the Xcode Command Line Tools, the official drjava-beta-20190813-220051.jar and Amazon Corretto 8 for Apple silicon (the macOS aarch64 .tar.gz, unpacked).

git clone https://github.com/erfanulfarhan/drjava-mac.git
cd drjava-mac
DRJAVA_JAR=~/Downloads/drjava-beta-20190813-220051.jar \
JDK=~/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk \
./build.sh

build.sh checks the jar against SourceForge's published MD5, compiles the launcher for Apple silicon and Intel, patches the debugger address, copies Java 8 in (without its 50 MB source archive), signs the app ad hoc and zips it, with the Read Me, to ~/Downloads/DrJava-for-Mac.zip (set OUT to change that).

File What it is
launcher.m The app's native launcher: starts DrJava on the bundled Java 8 (or an installed one), fixes the Retina scale and the compiler's library path
patch_jar.py Changes one string in DrJava's MainJVM class so the debugger listens on 127.0.0.1 only
build.sh Builds the app and the zip
Info.plist The app's bundle settings
readme.txt The Read Me that ships in the zip

Licenses

  • The build scripts in this repository: MIT.
  • DrJava: BSD license, by the JavaPLT group at Rice University. Its license text ships in the zip's Read Me.
  • Amazon Corretto 8: GNU GPL version 2 with the Classpath Exception. The source code of the bundled version is at corretto-8 release 8.504.04.1.

This is an unofficial build. It isn't made or endorsed by Rice University, Amazon or Apple.

About

DrJava for Mac with Java 8 built in: one-click download, sharp on Retina, compile and run Java right away.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages