From f9fc03eb2b12f0b7e73f2602454ef92c8f2c6344 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 8 Apr 2025 20:03:26 +0100 Subject: [PATCH] juce_core: Update instructions for generating Java bytecode with new tools --- modules/juce_core/native/java/README.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/juce_core/native/java/README.txt b/modules/juce_core/native/java/README.txt index 55662d15d3..5c816f6199 100644 --- a/modules/juce_core/native/java/README.txt +++ b/modules/juce_core/native/java/README.txt @@ -28,16 +28,19 @@ Java.class and JuceApp.class which you will probably want to remove). 6. Inside of build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes -execute the following dx command: +execute the following d8 command: - /build-tools//dx --dex --verbose --min-sdk-version= --output /tmp/JavaDexByteCode.dex . + /build-tools//d8 --release --lib /sdk/platforms//android.jar --min-api . (Replace with the minimal sdk version you used in step 1.) 7. gzip the output: - gzip /tmp/JavaDexByteCode.dex + gzip ./classes.dex -8. The output /tmp/JavaDexByteCode.dex.gz is now the byte code that can be +8. The output ./classes.dex.gz is now the byte code that can be included into JUCE. You can use the Projucer's BinaryData generator functionality to get this into a convenient char array like form. +On macOS/Linux you could also use the following command: + + xxd --include ./classes.dex.gz