Community
Chat Logs
Sunday, June 7, 2026
- jreicherChronos: because it's the JVM "implementing" that exit code. If it wanted, it could override any exit code written in the Java code it's running.
- Chronosjreicher: Ah, that makes sense. Your carefully crafted exit code could easily be overridden, so you can't count on it.
- dreamrealbut that's the case for any of them
- dreamrealincluding C
- dreamrealthe only way you're going to guarantee that sort of thing is at the language spec level, and you have to trust the spec for it to be true anyway
- jreicherI was thinking that, and realised I never looked at the Java language spec for this.
- jreicherhttps://docs.oracle.com/javase/specs/jls/se25/html/jls-12.html#jls-12.8
- nevetChapter 12. Execution
- dreamrealjreicher: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int) is more important for this
- nevetSystem (Java SE 25 & JDK 25)
- dreamrealAnd, of course, https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Runtime.html
- nevetRuntime (Java SE 25 & JDK 25)
- jreicherThose two are actually referred to explicitly in the language spec section I linked
- dreamrealyes, but you'd have to follow them links!!!
- dreamreal!!11!
- jreicher:)