Ask coding questions

← Back to all posts
using Processing.org Java
matthewalangree (2)

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?

Commentshotnewtop
bridgetsitkoff (1)

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?

matthewalangree (2)

@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.

Prowse (0)

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.

ralphcrutzen (0)

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".

<iframe frameborder="0" width="100%" height="600px" src="https://repl.it/student_embed/assignment/1931000/20ebbaaddd668d87579c0535318d9da4"></iframe>
timmy_i_chen (939)

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

matthewalangree (2)

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

timmy_i_chen (939)

@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! :)

matthewalangree (2)

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

matthewalangree (2)

@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?

timmy_i_chen (939)

@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

timmy_i_chen (939)

@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)

Hexer (31)

@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!