Skip to content
← Back to Community
using Processing.org Java
Profile icon
matthewalangree

Hi there! I'm a HS Computer Science teacher and I'm STOKED to use REPL.it with my classes this next school year. We do a ton with Processing.org and I'm wondering if its possible to write processing code and see output in REPL.it?

Voters
Profile icon
AlizeBertrand
Profile icon
ralphcrutzen
Profile icon
timmy_i_chen
Profile icon
matthewalangree
Comments
hotnewtop
Profile icon
ralphcrutzen

Did you get processing.js to work with assignments? Because I only get it to work as a standalone repl and as a project.
I use the exact same files (index.html, processing.js and sketch.java) with the exact same code, but in an assignment, the repl doesn't run: "Error running code: Package not found".

Profile icon
bridgetsitkoff

I know this is an older post, but I'm trying to do something similar with my middle school CS classes next year. (We've been using OpenProcessing this year, but I'd like to move all my classes onto repl.it if possible.) Your method below works perfectly for me and I can get my classroom examples working in a repl.it HTML/CSS/JS classroom, but I can't figure out how to handle debugging with students. As far as I can tell, any error will just come up as a "script error" with no line number or specific error. How are you working around that with students?

Profile icon
matthewalangree

@bridgetsitkoff I've had the same issue. I only use repl.it for the multiplayer support at this point. It's been a nice tool to do some pair programming and assessment.

Profile icon
Scoder12

@bridgetsitkoff Open the repl view in a new tab and use the browser console (ctrl+shift+j)

Profile icon
Prowse

You can also add the p5.js package, which has most of the processing features. If you search for it you can add it as easily as jquery or any other popular js package.
This file cannot be displayed: https://storage.googleapis.com/replit/images/1548349848002_0eca6319b406a7e321c5a6144c54c0eb.pn

Profile icon
timmy_i_chen

By the way, if you look at the example again, you can use the .java extension to get syntax highlighting: https://repl.it/@timmy_i_chen/processing-js-example

Profile icon
matthewalangree

It seems that I could also use this javascript library which will translate my Processing.org Java code into javascript. How do I do that? https://raw.githubusercontent.com/processing-js/processing-js/v1.4.8/processing.min.js

Profile icon
timmy_i_chen

@matthewalangree processing.js is probably the closest you'll get to using processing on Repl.it at the moment. Here's an example:

https://repl.it/@timmy_i_chen/processing-js-example

edit the pde file - unfortunately no syntax highlighting. let me know if you have questions! :)

Profile icon
matthewalangree

@timmy_i_chen This is a great start for me. Thank you!

Profile icon
matthewalangree

@timmy_i_chen Okay, another question. I've built my first repl.it course and I'd like to use what you've created as a template for a student assignment. I don't see a way to add files to assignments I create. Can I do that?

Profile icon
timmy_i_chen

@matthewalangree What kind of classroom did you create? If it supports multiple files, you should be able to add a new file in the top-left corner of the workspace

Profile icon
matthewalangree

@timmy_i_chen Not sure. It's a JavaScript course: https://repl.it/community/classrooms/83856/assignments/1334961

Profile icon
timmy_i_chen

@matthewalangree Ah, you'd have to create a new HTML/CSS/JS classroom. This can all be done on your teacher dashboard (https://repl.it/teacher)

Profile icon
matthewalangree

@timmy_i_chen Boom. Thanks!

Profile icon
Hexer

@matthewalangree Processing.js is great! Here is somthing I made for a comptetion here on repl.it with it! https://repl.it/@Hexer/2-Player-Flappy-bird

So don't worry! Processing.js is capable for a lot of things!