From 589212d5f6c47fc1bab853b549fb4272ecf3e848 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 06:17:12 +0000 Subject: [PATCH] Ship jdk.charsets in the runtime JRE SKYBOX's native startup calls String.getBytes("GB2312"), which the base-only JRE refuses, so the game aborted a few seconds after launch. Co-Authored-By: Claude Sonnet 5.5 --- tests/jre_modules_test.py | 4 ++++ tools/dex/make_jre.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/jre_modules_test.py b/tests/jre_modules_test.py index ae0768d..d93ee99 100644 --- a/tests/jre_modules_test.py +++ b/tests/jre_modules_test.py @@ -36,6 +36,10 @@ def test_tls_and_ec_crypto_are_in_the_jre(self): # Android's EC KeyPairGenerator, KeyAgreement and Signature algorithms need it as well. self.assertIn("jdk.crypto.ec", modules()) + def test_extended_charsets_are_in_the_jre(self): + # Android has GB2312, Big5, Shift_JIS ... built in; SKYBOX's startup asks for GB2312 by name. + self.assertIn("jdk.charsets", modules()) + if __name__ == "__main__": sys.exit(unittest.main()) diff --git a/tools/dex/make_jre.py b/tools/dex/make_jre.py index 0255d2a..e24f6c0 100644 --- a/tools/dex/make_jre.py +++ b/tools/dex/make_jre.py @@ -14,8 +14,11 @@ # JSSE offers no ECDHE group, no ECDHE suite and no ECDSA signature, so Google, Firebase and most # CDN servers answer every HTTPS ClientHello with handshake_failure (issue 168). Dev runs use the # full JDK, so only the shipped JRE showed it. +# jdk.charsets: the extended charsets (GB2312, GBK, Big5, Shift_JIS, EUC-KR, ...). Android always has +# them, and apps ask for them by name: SKYBOX's native startup calls String.getBytes("GB2312") and +# died with UnsupportedEncodingException on the base-only JRE. # No java.sql or java.net.http. -MODULES = "java.base,java.logging,java.xml,java.desktop,jdk.crypto.ec,jdk.unsupported" +MODULES = "java.base,java.logging,java.xml,java.desktop,jdk.charsets,jdk.crypto.ec,jdk.unsupported" def main():