fix(gui): launch from non-ASCII Windows paths - #2929
Open
arimu1 wants to merge 1 commit into
Open
Conversation
Launch4j's portable .exe uses ANSI path APIs and cannot start when the install folder contains non-ASCII characters (emoji, CJK, etc.). - Ship jadx-gui.cmd in Windows portable zips (8.3 short path + javaw) - Prefer short path in cross-platform jadx-gui.bat - Add Launch4j error hints pointing at cmd/MSI/ASCII path workarounds - Document the limitation and workarounds in README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2926
The portable Windows
jadx-gui-*.exeis built with Launch4j, which uses ANSI Windows path APIs. When the install directory contains non-ASCII characters (emoji such as 🌐, CJK, accented letters, …), Launch4j corrupts the classpath / JRE path and the JVM shows a generic JNI error with no useful guidance.This does not replace Launch4j (wrapping the large shadow jar is not viable after #2186 / zip64). Instead it adds a practical launcher and clearer guidance:
jadx-gui.cmdin Windows portable zips (distWin/distWinWithJre)javawwith the same JVM options as the application plugin / Launch4j configbin/jadx-gui.bat: prefer%%~sishort path forAPP_HOMEwhen availableerrTitle+ startup/launcher/JRE-not-found texts point users atjadx-gui.cmd, MSI, or an ASCII-only path (the JVM JNI dialog itself still cannot be customized)Test plan
./gradlew :jadx-gui:writeWinCmdLauncher— generates CRLFjadx-gui.cmdwith expected JVM opts./gradlew :jadx-gui:createExe :jadx-gui:copyDistWin— bundle containsjadx-gui-*.exe,jadx-gui.cmd, andlib/*.jar./gradlew :jadx-gui:startShadowScripts—scriptsShadow/jadx-gui.batuses%%~siforAPP_HOME./gradlew :jadx-gui:test --tests jadx.gui.TestI18n./gradlew :jadx-gui:spotlessCheckC:\Users\…\🌐\jadx), confirm.exestill fails as before, double-clickjadx-gui.cmdstarts the GUIjre\bin\javaw.exe)