Error: "Hello Processing" / JDK 10 / OSX High Sierra / com/apple/eawt/QuitHandler not supported


I am trying to run a “Hello Processing” Java application (using Eclipse photon),
with OSX High Sierra (10.13.x), having Java jdk 10.
Is it supported?

This is the code:

import processing.core.PApplet;
public class UsingProcessing extends PApplet{
	public static void main(String[] args) {

This is the error I get:

java.lang.NoClassDefFoundError: com/apple/eawt/QuitHandler
	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(
	at java.base/java.lang.Class.getMethodsRecursive(
	at java.base/java.lang.Class.getMethod0(
	at java.base/java.lang.Class.getMethod(
	at processing.core.PApplet.runSketch(
	at processing.core.PApplet.main(
	at processing.core.PApplet.main(
	at UsingProcessing.main(
Caused by: java.lang.ClassNotFoundException:
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
	at java.base/java.lang.ClassLoader.loadClass(
	... 9 more

In a word no. You need to stick to jdk8, use of proprietary code in java has been warned about for years, finally they really mean it. Processing uses proprietary code* in a number of areas to deal with MacOS specific foibles. See for when might do something about it. It might be worth trying to put this jar on your path.


I’m very late to the party, but I found this post because I had the exact same issue in April 2021, running Java 11 on Mac with the latest 3.3.7 Processing core.jar. After digging around I found that the internal Mac APIs that Processing has been misusing to add a proper quithandler and set a dock icon has now been removed and replaced by official AWT APIS. There is a class inside Processing called ThinkDifferent that is loaded by reflection when Mac is detected and this class was calling the now removed APIs. To solve this I reimplemented this class using the new official APIs and just added a new processing.core.ThinkDifferent class to my project that solved the issue.

package processing.core;

import java.awt.Desktop;
import java.awt.Image;
import java.awt.Taskbar;
import java.awt.desktop.QuitEvent;
import java.awt.desktop.QuitHandler;
import java.awt.desktop.QuitResponse;

public class ThinkDifferent {

  // True if user has tried to quit once. Prevents us from cancelling the quit
  // call if the sketch is held up for some reason, like an exception that's
  // managed to put the sketch in a bad state.
  static boolean attemptedQuit;

  public static void init(final PApplet sketch) {
    Desktop desktop = Desktop.getDesktop();
        new QuitHandler() {
          public void handleQuitRequestWith(QuitEvent e, QuitResponse response) {
            if (PApplet.uncaughtThrowable == null && !attemptedQuit) {
              attemptedQuit = true;
            } else {

  public static void cleanup() {

  // Called via reflection from PSurfaceAWT and others
  public static void setIconImage(Image image) {

thank you Paul, this allowed me to use Processing in Visual Studio Code with JDK 11 on Mac OS 12.3.