Earlier quoted context omitted.
As a sysadmin, not developer, I hate Java almost as much as Windows. The error messages Java apps produce are like coded messages that you have to decipher. I.E. Instead of " TLS Handshake failed" it will be something like "ERROR: PKIX failed". So now I have to figure out that PKIX is referring to PKI and it would make too much sense to provide the domain that failed. Instead I have to play the guessing game.
Did you mistype Go? Java has proper error messages with a full stack trace that tells the whole story. Of course individual developers may lazy out on writing useful error messages, but that's hardly a Java issue. Meanwhile in Go you can be happy to have any error message at all. And then you can hope it's a unique string you can grep in a codebase. Where you only may find a line of code you could have arrived from m…
JVM Options Explorer
111–120 of 122 posts
Re: JVM Options Explorer
#112Earlier quoted context omitted.
As a sysadmin, not developer, I hate Java almost as much as Windows. The error messages Java apps produce are like coded messages that you have to decipher. I.E. Instead of " TLS Handshake failed" it will be something like "ERROR: PKIX failed". So now I have to figure out that PKIX is referring to PKI and it would make too much sense to provide the domain that failed. Instead I have to play the guessing game.
So your issue isn't with Java, just with shit error messages and devs clearing the exception stack.
Re: JVM Options Explorer
#113Earlier quoted context omitted.
grep "caused by" Here you are.
Why not just make your errors more readable and not have to use an extra tool?
How do you make this more readable:
ExceptionName: Dev-given message at Class(line number) at Class(line number) caused by AnotherCauseException: Dev-given message at Class(line number)
It's only the dev given message that may or may not be of good quality, the exact same way as it is in go. It's a plus that you can't accidentally ignore error cases, and even if a dev was lazy, you still have a pretty good record for where a given error case could originate from.
Re: JVM Options Explorer
#114Re: JVM Options Explorer
#115Chrome has 1496 [0] known options as of today, maybe after a few more pushes they'll catch up to the 1843 of JVM. An interface like above to sort things would probably be quite helpful as well. [0] https://peter.sh/experiments/chromium-command-line-switches/
archived on 2026-04-12: https://web.archive.org/web/20260412085953/https://peter.sh/...
Re: JVM Options Explorer
#116Earlier quoted context omitted.
So your issue isn't with Java, just with shit error messages and devs clearing the exception stack.
I would believe you, except that it is a problem with every Java app I have supported, and there are people in this very thread defending it. I do not want a stack trace unless I specifically request it. I am not a Java developer, 10 pages in less showing names of packages I don't even know what they are is not useful. It just muddies the water so that it's much harder to make sense of and spot the relevant line; ass…
Re: JVM Options Explorer
#117Earlier quoted context omitted.
This is why stack traces exist. But I agree Java seems to not really have a culture of “make the error message helpful”, but instead preferring “make the error message minimal and factual”. For what it’s worth, the rise of helpful error messages seems to be a relatively new phenomenon the last few years.
A stack trace that is >10 pages in less is not what I would call minimal.
1. STDOUT for quick and easy look, short format.
2. File as JSON for node-local collectors.
3. Proper logging storage like VictoriaLogs/Traces for distributed logging.
Each appender has its own format, some print only short messages, others full stacktraces for all causes (and with extra context information like trace id, customer id etc). I really think STDOUT-only logging is trying to squeeze different purposes into one unformatted stream. (And Go writing everything to STDERR was a really strange choice).Re: JVM Options Explorer
#118Earlier quoted context omitted.
This is the kind of scenario that is served better by Go/C-style error values than exceptions. Error values facilitate and encourage you to log what you were doing at the precise point when an error occurs. Doing the same with exceptions idiomatically often requires an exception hierarchy or copious amounts of separate try/catches. The difference really becomes apparent when trying to debug a customer's problem at 3a…
This couldn't be further from the truth. There is no ecosystem I would choose over Java when it comes to observability and it's not even close. Good luck finding your segfault, oom, race condition or just simply lazy logging culture bug with a C/go codebase at 3am. I will happily see my proper stack trace, heap dump, or connect directly to prod with a debugger with basically no performance penalty.
And if you're not catching N levels up but catching at each level, then you are emulating error values but with try/catch blocks.
Re: JVM Options Explorer
#119Earlier quoted context omitted.
You can get into difficulty with kubernetes here, as your jvm will detect all cores on the node but you may have set a resources limit on the pod/whatever, so it’ll assume it can spend more time doing stuff than it actually can, so often times it’s quite necessary to tune some things to prevent excessive switching etc.
Modern JVMs will detect orchestrator-set cgroup limits and size themselves accordingly. If you, for example, set a cpu limit for a pod to “1”, the JVM will size itself as if it was running on a single core machine.
Re: JVM Options Explorer
#120Earlier quoted context omitted.
A stack trace that is >10 pages in less is not what I would call minimal.
And that's why you should have multiple appenders. So in code you write "log.error("...", exception)" once, but logging writes it in parallel to: 1. STDOUT for quick and easy look, short format. 2. File as JSON for node-local collectors. 3. Proper logging storage like VictoriaLogs/Traces for distributed logging. Each appender has its own format, some print only short messages, others full stacktraces for all causes (…