Skip to content

PDE no longer passing –external #5843

@jeremydouglass

Description

@jeremydouglass

Description

I have sketches that I've been using for several years that can be run either from PDE (manually) or from processing-java (automatically, with optional arguments). I use PApplet "external" flag (documented here)

Parameters used by Processing when running via the PDE
--external set when the applet is being used by the PDE

...to detect whether the sketch was launched by PDE or not, as in this sketch:

boolean PDE;
void setup() {
  String cmd = System.getProperty("sun.java.command");
  println(cmd);
  if (cmd.contains("--external")) {
    PDE=true;
  } else {
    PDE=false;
  }
  println(PDE);
}

That works up to 3.4 – when run from PDE the output contains “–external” as per the documentation, and the flag is set.

processing.core.PApplet --location=1213,185 --external --display=1 --sketch-path=/Users/student/Downloads/Test Test

Now, in 3.5.3, that doesn't work. When run from PDE, the “external” flag is missing.

processing.core.PApplet --display=1 --sketch-path=/Users/student/Downloads/Test Test

Any idea why / how this might have happened? Is it a bug / regression, or a change in Processing, or the bundled Java? I’m not even sure where to start looking.

Expected Behavior

PDE passes flag, giving evidence that it is the runtime context.

Current Behavior

In PDE 3.5.3, the external flag is no longer observed in System.getProperty("sun.java.command")

Steps to Reproduce

  1. Run the test sketch in PDE 3.4 -- external flag is observed
  2. Run the test sketch in PDE 3.5.3 -- external flag is not observed

Your Environment

  • Processing version: 3.4 / 3.5.3
  • Operating System and OS version: MacOS 10.12.6, also tested on MacOS 13 and Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions