Processing 4 processing-java binary?

I’m looking for a way to use Processing 4 without relying on the PDE. Specifically, I’d like to know if a processing-java binary is distributed through any package manager (e.g., Homebrew, apt, pacman, etc.). I haven’t found any documentation in the repository about working with Processing in an editor‑agnostic manner, and I’d prefer to avoid using the built‑in PDE.

Any pointers or recommendations would be greatly appreciated—thanks!

Are you going to run your Processing files from the command-line? This is what I have for my mac:

Command line edition for Processing 4.4.10 (Java Mode)

--help               Show this help text. Congratulations.

--sketch=<name>      Specify the sketch folder (required)
--output=<name>      Specify the output folder (optional and
                     cannot be the same as the sketch folder.)

--force              The sketch will not build if the output
                     folder already exists, because the contents
                     will be replaced. This option erases the
                     folder first. Use with extreme caution!

--build              Preprocess and compile a sketch into .class files.
--run                Preprocess, compile, and run a sketch.
--present            Preprocess, compile, and run a sketch in presentation mode.

--export             Export an application.
--variant            Specify the platform and architecture (Export only).
--no-java            Do not embed Java.

Starting with 4.0, the --platform option has been removed
because of the variety of platforms and architectures now available.
Use the --variant option instead, for instance:

variant        platform
-------------  ---------------------------
macos-x86_64   macOS (Intel 64-bit)
macos-aarch64  macOS (Apple Silicon)
windows-amd64  Windows (Intel 64-bit)
linux-amd64    Linux (Intel 64-bit)
linux-arm      Linux (Raspberry Pi 32-bit)
linux-aarch64  Linux (Raspberry Pi 64-bit)

The --build, --run, --present, or --export must be the final parameter
passed to Processing. Arguments passed following one of those four will
be passed through to the sketch itself, and therefore available to the
sketch via the 'args' field. To pass options understood by PApplet.main(),
write a custom main() method so that the preprocessor does not add one.
https://github.com/processing/processing/wiki/Command-Line


Have you tried installing it from the Processing IDE menubar:

Hi @SNitaine! We’ve been hard at work trying to decouple Processing core from the editor and make everything a bit more modular. As of now that work is not yet ready though!

So far we have the following:

We have core published to maven central as a standard Java library.

We have the Visual Studio Code plugin

As for distributing processing-java as a standalone, if you look under the hood of that binary you will see that is just a wrapper around running the PDE binary with some extra arguments, so a decoupling is unlikely there.

2 Likes

Thanks for the info. I haven’t tried it, I am on a new machine and I haven’t downloaded the PDE yet… I am trying not to :smiley:

Oh I wasn’t aware that it is just a wrapper around running the PDE binary. I can only imagine how much hard work that goes into decoupling Processing. I will try and follow the process on GitHub.

Thanks, I will try and take a look at the maven core.

1 Like

Not sure why you’re allergic to the editor, but alternatively you could get your hands on the executable and access that with the command line. Which operating system are you using?

I can’t recall where I got the executable, but I tested it and it works.

Hello @SNitaine,

Editor-agnostic guidance that may work for a Windows 10 and Processing 4.4.10 environment:

  • Download the portable ZIP version:
    Releases · processing/processing4 · GitHub

  • You will have to (makes life easier) add processing.exe to your environment path.

  • This is the command-line for --help:
    D:\Users\GLV\Documents\P4>processing cli --help | more

Output

  • This will launch a sketch:
    D:\Users\GLV\Documents\P4>processing cli --sketch=alpha_gradients_1_0_0 --run
Output

Note the usage of cli in the above!

Folders structure will certainly be different on your PC.

You may accidentally launch the PDE if you make mistakes on the command-line!

If you are comfortable with command-line this is going to be fun!

You may also consider perusing the older versions for one that includes the processing-java.exe if that is an option.

Have fun!

:)