Forums

Java Jre 8

Can I install Java jre 8 on Pythonanywhere?

I found some old announcement about you guys supporting Java (but only at command line), not sure if things have changed since?

My webapp is going to need java runtime (using a python wrapper of a java library), is it possible to achieve this with Pythonanywhere?

Thanks!

We have openjdk version "1.8.0_222" installed on PythonAnywhere. I do not know how that relates to the version of Java that you want to use, though. I have enabled our new virtualisation system that should allow you to run java code in a web app.

How can this Java console be accessed and run? I have some JAR files that I'd like to include on my webapp, how do I go about doing this? Thank you for your time, -PlasmodiumFalc

I've switched on the new virtualization system for your account, and it will work in any new consoles you start; your website will pick it up the next time you restart it from the "Web" page. In order to run Java from your website's code, you'll need to use Python's subprocess module to run the java command.

Could you explain how I would do that?

Also, is there a port I can use to route through?

Could you give some more details about what you're trying to do? What do the JAR files in question do? I don't want to advise you to do something that isn't applicable to your use case.

Hi, can I have the ability to run JAR files turned on for my account as well?

I want to call a JAR fle to run in the background and pipe the output to a flask webapp.for display.

Thank you.

How do you want to get that output to your web app?