CJMinecraft01 / ForgeModBuilder

Build, setup, update and refresh your modding environment!
55 stars 12 forks source link

[Suggestion] [v0.1.1.0] Add check for javac on JAVA_HOME to prevent recompileMc failure if not set to a JDK. #8

Closed Senseidragon closed 6 years ago

Senseidragon commented 6 years ago

Pastebin of log file is here.

I've tried backing down a few forge versions, nothing seems to make a difference. the :recompileMc step fails every time.

CJMinecraft01 commented 6 years ago

In the gradle folder in the project workspace there is a file called something like gradle wrapper properties, do you mind showing me that. This isn't a direct problem with FMB but it is highly likely it is a problem caused by insufficient memory when running recompileMc

Senseidragon commented 6 years ago

Upon further investigation by directly running the Gradlew myself, the JAVA_HOME was incorrectly set to a JRE, not a JDK. While technically a user error, a suggestion would be to add to the check in code that JAVA_HOME is correctly set to make sure that a javac binary is actually available at that location. A line in the compile log indicating your currently set JAVA_HOME would also make it a little easier to troubleshoot.

Once JAVA_HOME was reset to a proper JDK installation, everything works correctly.

Suggestion: Add a check that "javac" is available from the JAVA_HOME to prevent this potential error.

CJMinecraft01 commented 6 years ago

The suggestion you have made is a feature I am planning on implementing. When getting the log from the gradle console, only the information is displayed and not errors. I will try and get this feature added for the next update.