Hacker News new | ask | show | jobs
by randombytes6869 2170 days ago
Java meets your requirements. It gets a lot of shit but there's reasons why its so widely used.

The standard libraries + community are larger than Go, you can find a library to do anything. Standard library is huge and mostly great.

Compilation time is a couple seconds even for huge projects. You can do automatic reloads using Gradle.

Its very cross platform, including one of the only good cross platform desktop UI's.

You can build smaller binary distributions using JLink or a multitude of third party tools.

Single binaries are overrated. Any app that's widely distributed uses an installer or package management anyways (brew,choco,apt)

3 comments

> Single binaries are overrated. Any app that's widely distributed uses an installer or package management anyways (brew,choco,apt)

Single binaries are easier to install and maintain even if you have to maintain an installer.

I'm a Java developer, but I take issue with your last point:

"Single binaries are overrated. Any app that's widely distributed uses an installer [...]"

That's true once you have the kind of traction where distro maintainers are going to consider packaging it themselves. But to attain that kind of popularity having a stand-alone binary is going to make a huge difference.

Unless you're willing to build all those packages/installers from scratch!

My opinion is between these. A single binary is easier, and the java app deployment could be made better than it is now.

Currently I make an 'uberjar' that includes all java dependencies including Tomcat/Jetty/etc: java -jar my-app.jar

What's annoying is finding the desired JDK/JRE for each OS with the right license and manually installing it. Sometimes having to make some file fixes (e.g. OpenJ9 JDK & Maven compatibility).

Another benefit of using the JVM is that you have a variety of languages to pick from that target the JVM and can interop with Java, which means you gain the benefits of all the libraries but also being able to experiment with other languages.