logoalt Hacker News

tomaytotomatotoday at 11:59 AM2 repliesview on HN

It's a result of Java being required to run on many different OS environments (Oracle, Redhat, Windows, RISC/ARM/x86), along with user constraints and also business requirements.

In a way you can use this list of JVM options to illustrate how successful Java has become, that everyone needs an option to get it to work how they like it.

As a Java dev, I have maybe used about 10-15 of them in my career.

The weirdest/funnest one I used was for an old Sun Microsystems Solaris server which ran iPlanet, for a Java EE service.

Since this shared resources with some other back of office systems, it was prone to run out of memory.

Luckily there was a JVM option to handle this!

-XX:OnOutOfMemoryError="<run command>"

It wasn't too important so we just used to trigger it to restart the whole machine, and it would come back to life. Sometimes we used to mess about and get it to send funny IRC messages like "Immah eaten all your bytez I ded now, please reboot me"


Replies

Hendriktotoday at 1:13 PM

> As a Java dev, I have maybe used about 10-15 of them in my career.

So do we really need multiple thousand? Having all of them also makes finding the few you actually need much more difficult.

show 1 reply
nkzdtoday at 12:09 PM

Which JVM options do you use the most?

show 1 reply