Skip to content

Add "Download Java" button to dialog & other small changes#35

Closed
trustytrojan wants to merge 3 commits intoCleanroomMC:masterfrom
trustytrojan:download-jvm
Closed

Add "Download Java" button to dialog & other small changes#35
trustytrojan wants to merge 3 commits intoCleanroomMC:masterfrom
trustytrojan:download-jvm

Conversation

@trustytrojan
Copy link
Copy Markdown

@trustytrojan trustytrojan commented Dec 2, 2025

  • The "Download Java" button is right next to the "Browse..." and "Test" buttons, it opens the OS browser to the Adoptium Temurin Java 25 download page, or displays a link in a dialog if no browser can be opened. (Closes Java auto-provisioning support #6)
    • The button can be more specific and say "Download Java 25" if desired
    • I could also "hyperlink" the "Select Java 21+ Executable" label, but that's less obvious for a confused user to click on than a big "Download Java" button.
  • Add a dark mode, default on, configurable
  • Pre-select the latest Cleanroom Launcher version
  • Specify that we want a Java 21+ executable in the label above the path-to-executable box
  • "Hyperlink" the "Java Arguments" part of the "Add Java Arguments:" label to open to the Cleanroom Wiki page on JVM Arguments

Copilot AI review requested due to automatic review settings December 2, 2025 03:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Cleanroom Relauncher GUI with user experience improvements including a "Download Java" button, dark mode support, and improved default selections. The button provides direct access to Java downloads via the system browser or displays the download link in a fallback dialog. Dark mode is implemented as a configurable option that defaults to enabled.

  • Added "Download Java" button that opens the Adoptium Temurin download page or shows a dialog with the link
  • Implemented dark mode functionality with configuration persistence
  • Changed default selection to pre-select the latest Cleanroom release instead of using an uninitialized value

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/main/java/com/cleanroommc/relauncher/gui/SupportingFrame.java Fixed initial visibility to false (prevents supporting frame from appearing)
src/main/java/com/cleanroommc/relauncher/gui/RelauncherGUI.java Added Download Java button with browser integration, dark mode UI implementation, updated label to specify Java 21+, and fixed release pre-selection
src/main/java/com/cleanroommc/relauncher/config/RelauncherConfiguration.java Added darkMode configuration field with getter/setter methods
.vscode/settings.json Added VS Code Java null analysis setting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +391 to +398
"Please download Java 21 or later from:\n" + downloadUrl,
"Download Java",
JOptionPane.INFORMATION_MESSAGE);
}
} catch (Exception ex) {
CleanroomRelauncher.LOGGER.error("Failed to open browser", ex);
JOptionPane.showMessageDialog(this,
"Please download Java 21 or later from:\n" + downloadUrl,
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The download URL points to Java 25 (version=25), but the error messages say "Java 21 or later". This creates an inconsistency. Either update the URL to point to Java 21 downloads, or update the error messages to say "Java 25 or later" to match the URL.

Suggested change
"Please download Java 21 or later from:\n" + downloadUrl,
"Download Java",
JOptionPane.INFORMATION_MESSAGE);
}
} catch (Exception ex) {
CleanroomRelauncher.LOGGER.error("Failed to open browser", ex);
JOptionPane.showMessageDialog(this,
"Please download Java 21 or later from:\n" + downloadUrl,
"Please download Java 25 or later from:\n" + downloadUrl,
"Download Java",
JOptionPane.INFORMATION_MESSAGE);
}
} catch (Exception ex) {
CleanroomRelauncher.LOGGER.error("Failed to open browser", ex);
JOptionPane.showMessageDialog(this,
"Please download Java 25 or later from:\n" + downloadUrl,

Copilot uses AI. Check for mistakes.
Comment thread .vscode/settings.json
Comment on lines +1 to +3
{
"java.compile.nullAnalysis.mode": "automatic"
} No newline at end of file
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] IDE-specific settings files like .vscode/settings.json should typically not be committed to version control as they contain personal editor preferences. Consider adding .vscode/ to .gitignore and removing this file from the repository to avoid conflicts between different developers' IDE configurations.

Copilot uses AI. Check for mistakes.
@trustytrojan
Copy link
Copy Markdown
Author

Note: the dark mode is not fully working on Windows, idk why, probably best to leave it default disabled in config. Do this before merging

@Rongmario
Copy link
Copy Markdown
Member

Superseded by #36, thank you for the work nonetheless.

@Rongmario Rongmario closed this Mar 20, 2026
@trustytrojan trustytrojan deleted the download-jvm branch April 6, 2026 18:28
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.

Java auto-provisioning support

3 participants