4 ms·
To run a Java jar-with-dependencies you only need to `java -jar app-with-deps.jar` which isn't really that hard at all.
by karmakaze 7y ago
To run a Java jar-with-dependencies you only need to `java -jar app-with-deps.jar` which isn't really that hard at all.
- axaxs 7y agoThis skips the steps of choosing and installing a JVM, which is a bit daunting. My distro gives like 4 different versions. And worse, some applications only run on certain versions. By default, there is no 'java' command.
- weego 7y agoThat's not really a good faith argument. That's the equivalent of saying that a major problem with NodeJS is you have to pick which version to install before you deploy. I deploy single package jvm files most days having not had to consider the deploy environment for a about 4 years.
- femiagbabiaka 7y agoIt is a good faith argument — it’s literally the whole point. Native binaries bypass all of that.
- Tsarbomb 7y agoGood luck when you need to deploy to a system with a different version of libc.
- splix 7y agoAlso with different version of openssl
- femiagbabiaka 7y agogoalposts are moving at a rapid pace
- tamale 7y agohaving a different version of libc is exactly like worrying that the system has a different version of java. If you know about these 'gotchas', they're not big deal. If you don't, then ya, they can be a bit intimidating at first. I really don't think running a go app vs. a java app is ANY different.
- femiagbabiaka 7y agoI’m trying to figure out what environments you’re working in where libc incompatibilities are as common as java versioning issues You’ve made a straw man and are now working very hard to defend it.
- jooz 7y agoWhat is hard is not to choose the java version (1.8,19,...), but the JVM implementation. To choose between hotspot, openjdk, oracle. Even to find the download link without being forced to log in on oracle.com was difficult (in fact I couldnt find it the very last time).
- morelisp 7y ago> That's the equivalent of saying that a major problem with NodeJS is you have to pick which version to install before you deploy. Are you saying this isn't a major problem with Node? In my experience it's a problem with every language that requires a separate runtime. The JVM is the worst of two worlds because I have the build complexity of an AOT compiler to make my deployment artifact and the deployment complexity of an interpreted language to get the correct runtime pre-installed.
- Tsarbomb 7y agoYou do realize Java has maintained it's backwards compatibility making choosing your deployment runtime significantly easier.
- karmakaze 7y agoThis is a question you have to answer once for your project. Similar to choosing which OS, database, library, or framework to use. There's no avoiding having knowledge or learning when choosing dependencies. Just about any of the implentations will work fine. You only have to concern yourself with avoiding use of the Oracle runtime in production without a license. If in doubt, install the latest AdoptOpenJDK[0] Hotspot version that's compatible with your app. [0] https://adoptopenjdk.net/ https://adoptopenjdk.net/
- apta 7y 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.