Skip to content

fix(java): resolve Java executable path using JAVA_HOME or fallback to 'java'#6

Merged
GhostTypes merged 2 commits intoMCDxAI:mainfrom
Narazaka:fix/java-home
Mar 28, 2026
Merged

fix(java): resolve Java executable path using JAVA_HOME or fallback to 'java'#6
GhostTypes merged 2 commits intoMCDxAI:mainfrom
Narazaka:fix/java-home

Conversation

@Narazaka
Copy link
Copy Markdown
Contributor

Since Minecraft often requires installing multiple Java versions, it would be nice to be able to select the one set as JAVA_HOME.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a getJavaExecutable helper function to resolve the Java path by prioritizing the JAVA_HOME environment variable over the default system path. The executeJavaProcess and getJavaVersion functions were updated to utilize this new helper. Feedback was provided to use the normalizePath utility when resolving JAVA_HOME to ensure cross-platform compatibility and consistency with other path handling in the codebase.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@GhostTypes GhostTypes self-assigned this Mar 28, 2026
@GhostTypes GhostTypes added the enhancement New feature or request label Mar 28, 2026
@GhostTypes GhostTypes merged commit 8735d86 into MCDxAI:main Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants