While it doesn’t have robust sync like Google docs, one option is to use Jupyter notebooks with Calysto Processing. That isn’t actually running Java Processing on the web, unfortunately – it is running Processing.js, which uses the Java syntax but then transpiles it to JavaScript so that it will run in browser. So your students can learn the Java syntax in a web environment, but they won’t be able to use the robust Java library ecosystem (opencv, minim, etc.) that they would while using PDE on the desktop.
The project homepage has some links to examples of pedagogical use.
If you haven’t worked with hosted Jupyter notebooks before you should be aware that you can get simultaneous edit access, but those are potentially destructive overwrite edits, and you can’t see what the other person is doing – it isn’t live co-editing. So you need to coordinate really carefully when you open a notebook that someone else is editing, and then have them load your changes. But it is doable.
(I should also note that it is possible to host a straight Java kernel in online Jupyter notebooks – https://github.com/SpencerPark/IJava – but then your students would need to import processing as a library and program Processing in straight Java syntax, with public, private, et cetera. That could be really challenging for beginners.)