ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#nevet

  1. jreicher Chronos: 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.
  2. Chronos jreicher: Ah, that makes sense. Your carefully crafted exit code could easily be overridden, so you can't count on it.
  3. dreamreal but that's the case for any of them
  4. dreamreal including C
  5. dreamreal the 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
  6. jreicher I was thinking that, and realised I never looked at the Java language spec for this.
  7. jreicher https://docs.oracle.com/javase/specs/jls/se25/html/jls-12.html#jls-12.8
  8. nevet Chapter 12. Execution
  9. dreamreal jreicher: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System.html#exit(int) is more important for this
  10. nevet System (Java SE 25 & JDK 25)
  11. dreamreal And, of course, https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Runtime.html
  12. nevet Runtime (Java SE 25 & JDK 25)
  13. jreicher Those two are actually referred to explicitly in the language spec section I linked
  14. dreamreal yes, but you'd have to follow them links!!!
  15. dreamreal !!11!
  16. jreicher :)