Can I run Java programs or jar files on linode ? if yes , Could you give a detail as to how?
I would like to run java on a web page so as to users can interact with it.
Web does'nt provide much info nor did I find much help from Linode docs.
Can somebody help me out.
Thanks
1 Reply
Applets are long-dead. Modern JDKs will not allow you to write them anymore. Oracle removed the applet API around JDK 7 or 8 (the current edition is 11). No JDK you're likely to find easily supports developing applets any more. No modern web browser is going to understand the (X)HTML <applet></applet> tag pair anymore either (at least not without help from some dubious-quality plugin that was probably abandoned in 2014).
Running Java as part of a website back-end requires a Java app server…like Apache Tomcat. You can see here for more information on Tomcat:
To write stuff for Tomcat, you need one of the Java Enterprise Editions…be careful of the "official" ones available from Oracle -- they may or may not be free…and watch out for license encumbrances on your finished product. There are some open-source alternatives but I can't even begin to comment on their standards-completeness, usability or quality. You can Google all that…
OpenJDK is most likely an installable package on your distro. Just follow the normal procedure for installing packages (on Debian 10, the packages are called openjdk-11-jdk and openjdk-11-doc). From there you're on your own…
You have no idea of the size and complexity of the can of worms you're opening here… Unless you are already adept at all of the above, let me offer little friendly advice: use PHP, JavaScript, Django or Ruby on Rails for your project (depending on what it is you want to do). You'll complete your project with your sanity more or less intact and a lot more of your hair…
-- sw
P.S. Installing the openjdk-11-jdk package on my Debian 10 Linode drags in 780Mb of other packages…most of which are for Java UI framework support (almost all of X Windows and GTK) -- completely worthless in a headless environment like a Linode VM. You've been warned…