Modern Elevators and Escalators

Modern Elevators and Escalators

106k Downloads

Help Compiling Version 4.0.0

CaptainAngle opened this issue ยท 3 comments

commented

I am trying to build the mod with version 4.0.0 to try out the latest development features. This is not an issue related to the playing of the mod, but more of an issue about how to get it to compile. I feel like this is a problem related to what java I have installed on my computer.

Installed Software:
Minecraft Java and the Launcher
IntelliJ Idea Community Edition
Eclipse Adoptium JDK Java 21.0.1.12 Hotspot
%JAVA_HOME% set to root directory of the JDK (C:\Program Files\Eclipse Adoptium\jdk-21.0.1.12-hotspot)

Expected Behaviour
Click on run in IntelliJ and Gradle builds and launches Minecraft 1.20.4 launcher with the latest features of the mod.

Actual Behaviour
I can't see the Minecraft Client (fabric) run in IntelliJ
When I click run on build.gradle in the root directory of the project, the compiler throws this error:


Could not determine the dependencies of null.

Could not resolve all dependencies for configuration ':buildSrc:buildScriptClasspath'.
Failed to calculate the value of task ':buildSrc:compileJava' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=8, vendor=any, implementation=vendor-specific}.
> No locally installed toolchains match (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sub:download_repositories).

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.


If I install java from java.com, it recognizes the jre installation, but because it's not the JDK, it can't find tools.jar.


Execution failed for task ':buildSrc:compileJava'.

Could not find tools.jar. Please check that C:\Program Files\Java\jre-1.8 contains a valid JDK installation.

Possible solution:


Reproduction Steps

  1. Install IntelliJ IDEA Community Edition
  2. Install Eclipse Adoptium JDK Java 21.0.1.12 Hotspot
  3. Install Java 8 JRE from java.com (the default download on windows)
  4. Clone the git repo
  5. git checkout 4.0.0
  6. Click on the run button in IntelliJ

Crash Report
Attach a crash report to the issue.

Screenshots
image
Environment
IntelliJ IDEA Community Edition

  • Minecraft Version: 1.20.4 as shown in the gradle.properties
  • Installed Mods: Just the ones that gradle downloads as dependencies
commented

You need the Java 8 JDK, which usually can be downloaded within IntelliJ's project settings, or you can download it here:
https://adoptium.net/temurin/releases/?version=8

Run configuration does not get generated at the moment even if the gradle build is finished, you'll have to run runClient from your gradle task pane which can be opened on the top right

commented

I installed Java 8 JDK, and it went partially through with the compile, but it threw an exception (on run Minecraft Client (Fabric):
@mixin(ClientPacketListener.class)
^

image

commented

Fixed this error by resarting #793