Export of an Java Sketch fails!

Dear Community!

I am about to create an simple hookah-designer in Processing.
Its working on linux, but I would need it on Windows 10. And is there any simple way to get that .java/.jar file running on a web-page?
Or do I really have to switch to JS? Because I’ve read something that JAVA and Html isn’t a clever combination.
I can execute the programm with processing-java in the commandline. This is strange but it works… but I cant save it :neutral_face:
I tried the java_home and path varibales but no change!

Right now I am installing cygwin but that’s not the best solution…

My System:
Win 10 Pro 64 bit
JAVA JDK 1.8 and JRE 1.8
Processing 3.3.7 (is it a Stable-Release?)
8 GB RAM
1 TB SSHD
AMD Architecture( Hexa-Core FX-Series)

Would be really kind if someone could help me with that :wink:

See the discussion here:

Basically, you can’t embed a Java application in a website. You either have to use Processing.js or P5.js. This also means you can’t use Java-specific libraries.

You could export your sketch as an application and then allow users to download the application, but you can’t embed it directly in a webpage without using Processing.js or P5.js.

1 Like

Ok, thank you really much for the fast answer!
How much effort would it be to transpile the code from .java -> .js?
Is it worth it?

It depends on whether you’ve used any Java-specific code. Many Processing sketches can be deployed using Processing.js, but if you’ve used Java-specific libraries then that won’t work.

Shameless self-promotion: here is a guide on deploying Processing using Processing.js:

1 Like