SinTh0r4s / ExampleMod1.7.10

An example mod for Minecraft 1.7.10 with Forge focussed on a stable setup.
MIT License
25 stars 90 forks source link

Toolchains not working as expected on Windows #33

Open TheElan opened 2 years ago

TheElan commented 2 years ago

Try to find out what causes wired behaviour, on system where only jre was present and dev used a bundled version of 11th in IDEA there was a problem of gradle not downloading jdk and attempting to use jre.

Running ./gradlew build should ensure proper java setup

Test cases to try out:

  1. No java in the system - should automatically install 8th when
  2. Newer (11th) java in the system - should automatically install 8th when
  3. 8th jre in the system - should install 8th jdk
  4. Newer (11th) jre in the system - should install 8th jdk
  5. Many jdk versions including 8th - should use 8th
  6. Many jdk versions excluding 8th - should install 8th

Fiddle with PATH and JAVA_HOME (empty, present (pointing to java install dir), absent)

TheElan commented 2 years ago

We might want to consider rolling back to using if-throw exception on gradle evaluation if incorrect java is used (this means you need gradle to run on this java entirely, in comparison toolchain only forces it in some tasks), this way it will fail much faster.

SinTh0r4s commented 2 years ago

Yes. I think this is the way to go, untill all forge Gradle tasks can be converted to toolchains from Gradle 6