3 ms·
Ok, you have a java app I want on my system, what are the steps I need to do? (I'm on Ubuntu 18.04)
by gilbetron 6y ago
Ok, you have a java app I want on my system, what are the steps I need to do? (I'm on Ubuntu 18.04)
- splix 6y agoI guess you mean that Java 11 is not available on 18.04 by default, right? Java 11 was release in September 2018, so I guess Ubuntu 18.04, which came in April 2018, didn't have any chance to include it. Therefore you have to make an extra step to setup a ppa repo with software that didn't exist at the moment of release. Otherwise, at least with Ubuntu 19.04 which I have, it's simple `sudo apt install openjdk-11-jdk-headless`
- apta 6y agoYou can ship the JVM with your app such that it's self-contained and system independent. Apps like IntelliJ already do this. And now with jlink, you can strip it down to make deployment sizes even smaller by only shipping the parts of the JVM that your app uses.
- ashtonkem 6y agoThat’s the reasonable choice for consumer facing applications, yeah. For server applications it makes more sense to use something like Docker or a pre-built AMI. For what I do “how do I get Java on the server” is much less difficult than making deployments quicker and more efficient, which is more a problem for our CI/CD harness and integration tests. Neither of which are Java specific per se.
- parasubvert 6y agoFor server apps you don’t even need a Docker image or AMI, a fat JAR will usually do 90% of what you need. That said if you want to keep your JDK up to date via Docker or AMI of course that’s fine. a jlink JAR does the same thing but I can see the desire for wanting to decouple runtime upgrades from code upgrades.
- ashtonkem 6y agowget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/publi... | sudo apt-key add - sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ sudo apt-get install adoptopenjdk-<version>-hotspot Yes, it’s a few extra steps, but it’s not exactly Sisyphean now is it? Given the complexity of modern CI/CD pipelines, and the trend towards continuous deployment, making sure that a JVM is deployed alongside the uberjar is a pretty small ask. Would a single binary be easier? Sure. Would I change languages just for that? No, other factors are more important IMHO.