dwhitacre / dwhitacre/WindowsGSM.ForgeMC
Support multiple java paths via config or `JAVA_HOME`
- Dominant language
- C#
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
I'm running a 1.17 and a 1.12 minecraft server which require two different versions of Java 8 and 16
I have java 16 as my env variable I was wondering if I can do something like change line 71
private Process GetJavaProcess(string args)
{
var javaPath = JavaHelper.FindJavaExecutableAbsolutePath(); <<<<
return new Process
{
to
var javaPath = "C:\Program Files\Java\jre1.8.0_291\bin\java.exe";
However when I make that change with or without "" it unloads the plugin and shows an error on reload. I hope it's relatively easy thanks.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the GetJavaProcess method around line 71 and inspect JavaHelper.FindJavaExecutableAbsolutePath(). Reproduce the reload error with the hard-coded path, then trace how the plugin starts each server. Done means separate Java paths can be selected through configuration or JAVA_HOME without unloading the plugin or failing on reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100