7

I'm currently using Processing for a small project, however I'm not liking the text-editor that comes with it. I use vim to write all of my code. I've found where the .pde file are and I've been editing them from vim and then I'm reopening them and running them (it takes a lot to reload the script and running it). That's why I want a solution where I can compile everything from the terminal.

On close inspection I've found the processing-java file that supposedly compiles and runs a sketch. However whatever arguments I supply it, it keeps on spitting the help page. This is an example on how I'm running them.

(PS: I made a script that runs processing-java and added it to /usr/bin)

processing-java --sketch=/home/george/sketchbook/testproject --output=/tmp/processing/test --force --run

Can anyone help me please run my sketchs from the terminal?

3
  • I gave it a try too, looks like it's broken. Head over to code.google.com/p/processing/issues and file a bug report on it. Processing 2.0 is still in beta, so this is something they'll want to fix before releasing. Feb 9, 2013 at 15:32
  • This runs flawlessly for me on MacOS 10.8 with Processing 2.0b7. What OS are you on? Can you post your script? Feb 18, 2013 at 20:52
  • For the record, Processing has moved away from Google Code and towards GitHub. The current place to file a bug is at github.com/processing Apr 29, 2013 at 15:33

4 Answers 4

10

I managed to do it by creating a bash script called pjava and the code is as follow if anyone is having this question:

#!/bin/bash
rm -rf /tmp/processing
mkdir /tmp/processing
/home/euler/Desktop/processing-2.0b8/processing-java --output=/tmp/processing/ --force --sketch=$1 --run

And the way I run it is as follow:

If I am inside a folder called project, I run pjava ../project and project.pde will get compiled and run.

3

I know that this is late, but a simpler way would be to do it like this (assuming processing-java is in your path).
processing-java --sketch=$PWD --run
and add it to an alias:
alias pjava='processing-java --sketch=$PWD --run

2
  • This runs it, but where does it outputs the folder/file? Is it temporary or is it saving itself somewhere in my computer?
    – dawn
    May 16, 2021 at 6:11
  • 1
    Add the argument: --output=/place/to/output
    – Asher
    Sep 18, 2021 at 18:48
1

You can also just keep the processing app open and use any editor.

When you save the changes in say VS code (I have the processing extension but don't think that does anything but syntax highlighting), it will show in the processing app and you can run it from there. Having a script is nice, but processing's visual interface is handy too.

0

better way to start processing in linux using terminal is to navigate to the directory has processing-java file and then in write

./processing

to start the software

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.