Fix/macos launcher and splash#1776
Conversation
OSXFullScreenAdapter extends com.apple.eawt.FullScreenAdapter, a sealed JDK class. On JDK 17+ the module system rejects the subclass at load time with "IllegalAccessError: superclass access check failed" unless java.desktop/com.apple.eawt is opened to the unnamed module. - Add --add-opens/--add-exports for java.desktop/com.apple.eawt(.event) to the run, runDebug, and runTest Gradle tasks. - Add Add-Opens/Add-Exports manifest attributes to the shaded jar so packaged launches via \`java -jar\` also work.
The undecorated splash screen had a few small UX rough edges: - Status/sub-action/error-summary text was rendered with JLabel, so users could not select or copy it (useful when reporting a startup error). - The frame has no titlebar, so there was no way to move the splash out of the way during long downloads. Changes: - Swap the action / subAction JLabels for non-editable JTextFields and the error summary JLabel for a JTextArea; keep the same visual style. - Strip the HTML wrapper from the error summary now that JTextArea handles wrapping natively. - Make the "Did you know?" fact area focusable so its text can also be selected. - Install a mouse press/drag listener on the root panel and logo so the splash window can be repositioned. Text components consume their own mouse events, so selection still works.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR modifies the RuneLite client build configuration and splash screen UI. The build configuration now exposes Java module access for macOS's Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Two small launcher-path fixes that affect anyone running Microbot from source on macOS.
1. macOS
IllegalAccessErrorat startupOSXFullScreenAdapterextendscom.apple.eawt.FullScreenAdapter, which lives in a sealed JDKmodule. On JDK 17+ the module system rejects the subclass at class-load time:
java.lang.IllegalAccessError: superclass access check failed:
class net.runelite.client.ui.OSXFullScreenAdapter ...
Fix: add
--add-opens/--add-exportsforjava.desktop/com.apple.eawt(.event)to therun,runDebug, andrunTestGradle tasks, plus matchingAdd-Opens/Add-Exportsattributes onthe shaded-jar manifest so
java -jarlaunches also work.2. SplashScreen UX
action,subAction, and the error-summary label become non-editableJTextField/JTextAreaso users can highlight and copy them (helpful when reporting a startupfailure).
can be moved out of the way during long downloads.
JTextAreahandles wrapping natively.Test plan
./gradlew :client:runon macOS (JDK 17) — splash + client open withoutIllegalAccessError.splash moves it.
./gradlew :client:compileJavaclean.