Processing and Sublime: installing processing-java

edited January 2018 in Using Processing

Hi, I'm trying to install processing-java to start using Processing in Sublime. (Processing 3.3.6, Sublime 3 unregistered, Ubuntu 16.04.3 LTS). The tutorial that I use says: after installing Package Control and Processing package (which I did) open Processing and do Tools > Install "processing-java". However, under Tools I don’t have this option. I found Atom instruction saying to add PATH https://atom.io/packages/processing and tried it, but it says file exists:

xxx:~/Develop/Java/skillshare1$ sudo ln -s /Home/Scripts/processing-3.3.6/processing-java /usr/local/bin/ ln: failed to create symbolic link '/usr/local/bin/processing-java': File exists

Message in Sublime console when I try to run my sketch:

[Errno 2] No such file or directory: 'processing-java' [cmd: ['processing-java', '--force', '--sketch=/home/tge/Develop/Java', '--output=/home/tge/Develop/Java/build-tmp', '--present']] [dir: /home/tge/Develop/Java] [path: /home/tge/bin:/home/tge/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin] [Finished]

What am I doing wrong and how to fix this to be able to launch Processing programs from Sublime?

Sorry if this is a wrong thread to post this question, I was not sure where to publish it.

Thank you!

Tagged:

Answers

  • Answer ✓

    but it says file exists

    If file exist in the destination folder, then I am guessing there is no need to create the symbolic link. You can confirm the file is there by typing ls /usr/local/bin/processing-java

    You can check if this cmd runs properly by using it directly on a sample sketch, invoking this command manually in your console. If you want to test this, follow the instructions below: Test processing-java command manually.

    What instructions are you following to install sublime beside the atom link? I found this one from https://forum.processing.org/two/discussion/23905/building-processing-sketches-in-sublime-3-in-arch-linux/p1. You can search prev posts and see if if you find relevant posts: https://forum.processing.org/two/search?Search=sublime

    Kf


    Test processing-java command manually

    The next to work, you need to have your path to the processing-java executable in your PATH (ask below if you don't know about this). Go to a folder that contains a pde folder which it contains your pde file. For instance:

    cd /home/kf/Processing/mySketches

    If you run processing-java by itself, it provides instructions how to run the command. Next, I assume you have a demo.pde in a folder demo in the current directory. Then you can test processing-java runs by typing:

    processing-java --force --sketch=/home/kf/Processing/mySketches/demo --output=/home/kf/Processing/mySketches/demo/tmp --run

    This is exactly describe in the instructions above when executing processing-java by itself. This should compile and run your sketch. I don't have a linux machine to test this atm, but you might need to add sudo to the above command if you are having permission issues.

  • edited January 2018

    Thank you for your reply kfrajer! It appeared that I created a wrong symbolic link and path (paths were incorrect). How I fixed my problem:

    1. Deleted wrong link (rm java-processing from /usr/local/bin/processing-java)

    2. Rerun 2 commands correctly (1st adds environment variable, 2nd creates symbolic link to executable file): :~/Scripts/processing-3.3.6$ export PATH=$PATH:/home/tge/Scripts/processing-3.3.6/processing :~/Scripts/processing-3.3.6$ sudo ln -s /home/tge/Scripts/processing-3.3.6/processing-java /bin/processing-java

Sign In or Register to comment.