Skip to content

fix(gui): launch from non-ASCII Windows paths - #2929

Open
arimu1 wants to merge 1 commit into
skylot:masterfrom
arimu1:fix/2926-unicode-path-launch
Open

fix(gui): launch from non-ASCII Windows paths#2929
arimu1 wants to merge 1 commit into
skylot:masterfrom
arimu1:fix/2926-unicode-path-launch

Conversation

@arimu1

@arimu1 arimu1 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #2926

The portable Windows jadx-gui-*.exe is 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:

  1. jadx-gui.cmd in Windows portable zips (distWin / distWinWithJre)
    • Resolves the install dir, prefers an 8.3 short path when available (keeps classpath ASCII)
    • Starts javaw with the same JVM options as the application plugin / Launch4j config
    • Prints an explicit error if the jar/JRE cannot be found (mentions MSI / ASCII path)
  2. Cross-platform bin/jadx-gui.bat: prefer %%~si short path for APP_HOME when available
  3. Launch4j messages: errTitle + startup/launcher/JRE-not-found texts point users at jadx-gui.cmd, MSI, or an ASCII-only path (the JVM JNI dialog itself still cannot be customized)
  4. README: documents the limitation and workarounds

Test plan

  • ./gradlew :jadx-gui:writeWinCmdLauncher — generates CRLF jadx-gui.cmd with expected JVM opts
  • ./gradlew :jadx-gui:createExe :jadx-gui:copyDistWin — bundle contains jadx-gui-*.exe, jadx-gui.cmd, and lib/*.jar
  • ./gradlew :jadx-gui:startShadowScriptsscriptsShadow/jadx-gui.bat uses %%~si for APP_HOME
  • ./gradlew :jadx-gui:test --tests jadx.gui.TestI18n
  • ./gradlew :jadx-gui:spotlessCheck
  • Windows: unpack portable zip under a path with emoji (e.g. C:\Users\…\🌐\jadx), confirm .exe still fails as before, double-click jadx-gui.cmd starts the GUI
  • Windows: same for with-JRE zip (bundled jre\bin\javaw.exe)

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[gui] GUI Application fails to launch if ran from a Unicode path

1 participant