Jump to content

Gradle unable to determine java version


JamieEdwards

Recommended Posts

Hi,

 

Haven't been here in a while and decided to try my hand at modding again, however, I've a quite the issue. Gradle is trying to use Java version 11.0.4 but after reading online, Forge does not support this yet. As such, I'm trying desperately hard to make sure that it uses Java 8, however, I'm coming up to a loss.

I'm getting the following issue:
 

    14:07:32.113 [ERROR] [org.gradle.BuildExceptionReporter] 

    14:07:32.170 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.

    14:07:32.170 [ERROR] [org.gradle.BuildExceptionReporter] 

    14:07:32.171 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:

    14:07:32.171 [ERROR] [org.gradle.BuildExceptionReporter] Could not determine java version from '11.0.4'.

    14:07:32.175 [ERROR] [org.gradle.BuildExceptionReporter] 

    14:07:32.175 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:

    14:07:32.177 [ERROR] [org.gradle.BuildExceptionReporter] java.lang.IllegalArgumentException: Could not determine java version from '11.0.4'.

    14:07:32.177 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:68)

    14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.JavaVersion.current(JavaVersion.java:78)

    14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:32)

    14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)

    14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)

    14:07:32.178 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)

    14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)

    14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)

    14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.Main.doAction(Main.java:33)

    14:07:32.179 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

    14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/java.lang.reflect.Method.invoke(Method.java:566)

    14:07:32.180 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)

    14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)

    14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

    14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    14:07:32.181 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter]        at java.base/java.lang.reflect.Method.invoke(Method.java:566)

    14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)

    14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)

    14:07:32.182 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

 

My gradle version is 5.6.1 and the wrapper version is also 5.6.1.

My question is, how do I go about setting up gradle properly so that it can use the right java version so that I can start modding? 

Link to comment
Share on other sites

2 hours ago, JamieEdwards said:

As such, I'm trying desperately hard to make sure that it uses Java 8, however, I'm coming up to a loss.

Did you install Java JDK and JRE 8? Is your JAVA_HOME path pointing to them? Have you uninstalled Java 11?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.