Hacker News new | ask | show | jobs
by fancyfredbot 1549 days ago
Was nobody else surprised that this article about Java development focuses so much on CPU architectures?

I realize it's mostly talking about testing infrastructure rather than Java code but it feels sad that we end up here - I remember Java's top selling point being "write once run anywhere" and I genuinely believed the JVM would shield you from most issues with CPU architectures. But it seems like they managed to sneak back in through the back door.

6 comments

The JVM has worked fine on the M1 from almost day 1. I have workloads running on AWS Graviton without issue. I'm sure there was work getting the JVMs up and running on ARM initially, but as a user who builds on top of the JVM, they have worked great for me.

After skimming the article, it looks like it's mostly another long complaint about Docker which has been discussed many times at this point.

Reading the article, it appears the actual problem is actually Docker, not the JVM.
Yes, that's kind of what I meant by sneaking in through the backdoor. An article supposedly about Java development focuses on all the non-JVM dependencies. You don't need to build things in this way. Is this how everyone works these days? It surprised me that nobody else was commenting on this (edit: the comment from pjmlp is basically saying what I was thinking)
History repeats itself.

Before people thought Java would save everyone from ever having to think about native dependencies. Turned out not so much, although it works "OK" for desktop these days.

Now everyone thinks Docker is going to save everyone from having to think about native dependencies. In a few years everyone will realize that Docker only works like that when deploying from linux to linux on the same CPU architecture.

95% of the article is about getting Docker to run properly on M1 - not Java. The JVM works fine.
It seems that quite some dependencies like for networking, databases etc use natively build code internally using JNI. If those new targets like Mac arm64 are not added, those dependencies don't load. I can remember for example the Google Protobuf JVM package which uses the C++ written Protobuf library internally. It took quite some time before people inside Google had M1 machines and were building the JVM library too for M1.

It seems that those CPU architectures indeed sneak back through a back door... The same on Android, there you have also many libraries which need to be build and published for specific architectures. But luckily new architectures are not added regularly.

It's quite expected to see early teething issues when you roll out a new CPU and try to use existing software on it. This has nothing to do with java.
Yet another Java criticism here on HN? For every new supported CPU architecture you need time for "things to stabilize"...
You might want to read the article.
From the article: "It's only a matter of time until the last Java development tool works perfectly fine on an Apple M1."