#gradlew
192 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @thorny ferry! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
How are you running Gradle?
From the command line? Only your IDE?
What is your JAVA_HOME?
Do you have any toolchain configured in your build.gradle?
im running gradle in cmd and idk what java_home is supposed to be / mean
What is the output of echo %JAVA_HOME% in cmd?
JAVA_HOME is an environment variable that points to the Java installation if set up
Please also include the output of where java and where javac
do i paste echo %JAVA_HOME% in cmd
yes
echo is a command that just prints everything coming after it
this means no JAVA_HOME is set
look hold on one sec
where java
C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot\bin\java.exe
C:\Program Files (x86)\Common Files\Oracle\Java\java8path\java.exe
where javac
C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot\bin\javac.exe
javac 21.0.8
ok so how exactly do you see Gradle using the wrong Java version? Can you show your build.gradle file?
FAILURE: Build failed with an exception.
-
What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Eclipse Adoptium\jdk-17.0.16.8-hotspot\bin\java.exe -
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.
Get more help at https://help.gradle.org.
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4>
ok
There should be a program on Windows that you can use to edit environments
Can you try typing "environment" in your start menu? It should show something like "Edit user environment variables"
Add a new environment variable named JAVA_HOME and set the value to C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot
that should tell Gradle where to find Java
I think you didn't open the program I meant but yes, if you click on Environment Variables... you should get to it
How did you open that terminal?
held down shit and right clicked in open space in the folder that has gradle
ok
and did .\gradlew.bat build in cmd
yeah that's all I wanted to know
you should be able to add the environment variable once you get to that menu
yes
variable name is JAVA_HOME and the value is C:\Program Files\Eclipse Adoptium\jdk-17.0.16.8-hotspot
Actually can you show the contents of C:\Program Files\Eclipse Adoptium\jdk-17.0.16.8-hotspot?
actually my fault
the value should be C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot
looks good
now you should be able to close that cmd/PowerShell window, open it again and it should use JDK 21
FAILURE: Build failed with an exception.
-
What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Eclipse Adoptium\jdk-17.0.16.8-hotspot\bin\java.exe -
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.
Get more help at https://help.gradle.org.
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4>
Is that with a new cmd window?
yes
Can you try echo %JAVA_HOME% in cmd?
C:\Program Files\Eclipse Adoptium\jdk-21.0.8.9-hotspot
Did you do that in the same cmd window as there?
wdym
Is that the window you executed the echo %JAVA_HOME% in?
yea
Can you show the build.gradle file?
then build.gradle.kts
plugins {
id("fabric-loom") version "1.11-SNAPSHOT"
}
base {
archivesName = properties["archives_base_name"] as String
version = properties["mod_version"] as String
group = properties["maven_group"] as String
}
repositories {
maven {
name = "meteor-maven"
url = uri("https://maven.meteordev.org/releases")
}
maven {
name = "meteor-maven-snapshots"
url = uri("https://maven.meteordev.org/snapshots")
}
}
dependencies {
// Fabric
minecraft("com.mojang:minecraft:${properties["minecraft_version"] as String}")
mappings("net.fabricmc🧶${properties["yarn_mappings"] as String}:v2")
modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"] as String}")
// Meteor
modImplementation("meteordevelopment:meteor-client:${properties["minecraft_version"] as String}-SNAPSHOT")
}
tasks {
processResources {
val propertyMap = mapOf(
"version" to project.version,
"mc_version" to project.property("minecraft_version"),
)
inputs.properties(propertyMap)
filteringCharset = "UTF-8"
filesMatching("fabric.mod.json") {
expand(propertyMap)
}
}
jar {
inputs.property("archivesName", project.base.archivesName.get())
from("LICENSE") {
rename { "${it}_${inputs.properties["archivesName"]}" }
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 21
options.compilerArgs.add("-Xlint:deprecation")
options.compilerArgs.add("-Xlint:unchecked")
}
} ```
This message has been formatted automatically. You can disable this using /preferences.
Can you show the content of C:\Program Files\Eclipse Adoptium\jdk-17.0.16.8-hotspot?
ok so it seems you tried to uninstall that
Can you run ./gradlew --stop in the project
and then try again
yh
do i just open cmd
or cmd in the file thing
in the project
so there
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4> ./gradlew --stop
Stopping Daemon(s)
1 Daemon stopped
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4>
now try again
yes
u the goat daniel
its downloading or wtv
❤️
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: build
Configure project :
Fabric Loom: 1.11.4
<-------------> 0% CONFIGURING [21s]
IDLE
IDLE
root project
IDLE
IDLE
IDLE
You were facing this problem essentially: https://discuss.gradle.org/t/gradle-is-trying-to-use-a-jdk-that-has-been-uninstalled-from-my-system/43202/9
You had a running Gradle daemon that was still referencing the old JDK
The gradlew --stop commands stops all running Gradle daemons
A daemon is a background process and Gradle uses daemons as an optimization as it can achieve better performance by using the same process for consecutive builds
bruh
BUILD FAILED in 1m 30s
3 actionable tasks: 3 executed
Configuration cache entry stored.
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4>
Can you show the full build log/output?
ok seems there are compilation errors
y?
Your code is not valid Java code
These are errors in your Java code
Did you decompile that code?
jd-gui yea but i had permission from my friend who made the code
he just told me to decompile it
so your friend used an obfuscator which makes it hard to decompile/get useful stuff out of it
this resulted in one class being named null
or it's just an anonymous class and the decompiler couldn't deal with it
null is not a valid name of a Java class
so you'd need to rename that class and the references to it
and in wrESP2.java, there's a syntax error where a " is missing
it should probably be info("Deepslate at " + pos.method_23854(), new Object[0]);
yeah it's a pretty obvious error
the message literally tells you that the " is not closed
which file is it in
cause i looked in wresp2.java didnt see it
nvm
i was in wrong one
info("Deepslate at" + pos.method_23854(), new Object[0]);
like this?
alr
it would be the difference between Deepslate at123 and Deepslate at 123
info("Deepslate at " + pos.method_23854(), new Object[0]);
wait
one sec
it didnt copy correct
info("Deepslate at " + pos.method_23854(), new Object[0]);
and I think the , new Object[0] is technically unnecessary (but not incorrect) if the method is using varargs
no idea my friend js said to decompile his addon then copy and paste the coding and rebrand the meteor client addon for minecraft
i only know a littel about coding
but what other errors is there or was that it
idk what your decompiler did but it seems like your friend used an obfuscator making it difficult to decompile and make sense of the code
mainly the latter
what do i do now then
fix the errors I guess?
chat gpt said ```java
class null {
to replace with
class StashFinder$1 extends TypeToken<List<StashFinder.Chunk>> {} ```
This message has been formatted automatically. You can disable this using /preferences.
yes you'd need to change the null to something else there but I'm not 100% sure whether $1 is allowed there
you'll see
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
sure
can i just do this file by file
Task :compileJava FAILED
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\StoneESP.java:64: error: unclosed string literal
info("Stone at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\wrESP.java:84: error: unclosed string literal
info("Rotated deepslate at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\wrESP2.java:183: error: unclosed string literal
info("Deepslate at + pos.method_23854(), new Object[0]);
^
3 errors
[Incubating] Problems report is available at: file:///C:/Users/anton/OneDrive/Desktop/meteor-wr-addon-1.21.4/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileJava'.
Compilation failed; see the compiler output below.
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\StoneESP.java:64: error: unclosed string literal
info("Stone at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\wrESP.java:84: error: unclosed string literal
info("Rotated deepslate at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\modules\wrESP2.java:183: error: unclosed string literal
info("Deepslate at + pos.method_23854(), new Object[0]);
^
3 errors
- Try:
Check your code and dependencies to fix the compilation error(s)
Run with --scan to get full insights.
BUILD FAILED in 819ms
3 actionable tasks: 1 executed, 2 up-to-date
Configuration cache entry reused.
PS C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4>
i fixed all of it and its still showing up wrong
i fixed it all using notepad++
no
null is probably used in many other places
cooked
same issue with the missing "
as it seems
^
ah ok
Does it build successfully?
no
this is after i fixed everything
that still means you have the issues with the missing " in wrESP2
or
could it be this
"Rotated deepslate at "
shouldnt there be a space on both sides
yes
Why did your friend hive you the binaries to decompile?
instead of giving you the actual code they use
cause he wants to be a gatekeeper and not just hand out the source code
💔
wait
daniel
my friend said its the mappings
everytime i edit the notepad++ stuff
should i
.\gradlew.bat clean
.\gradlew.bat build
i did taskkill /f /im java.exe
then .\gradlew.bat build
and this happened
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: build
Configure project :
Fabric Loom: 1.11.4
:remapping sources
Task :compileJava FAILED
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\StoneESP.java:64: error: unclosed string literal
info("Stone at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\wrESP.java:84: error: unclosed string literal
info("Rotated deepslate at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\wrESP2.java:183: error: unclosed string literal
info("Deepslate at + pos.method_23854(), new Object[0]);
^
3 errors
[Incubating] Problems report is available at: file:///C:/Users/anton/OneDrive/Desktop/meteor-wr-addon-1.21.4/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileJava'.
Compilation failed; see the compiler output below.
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\StoneESP.java:64: error: unclosed string literal
info("Stone at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\wrESP.java:84: error: unclosed string literal
info("Rotated deepslate at + pos.method_23854(), new Object[0]);
^
C:\Users\anton\OneDrive\Desktop\meteor-wr-addon-1.21.4\src\main\java\wr\addon\modules\wrESP2.java:183: error: unclosed string literal
info("Deepslate at + pos.method_23854(), new Object[0]);
^
3 errors
BUILD FAILED in 23s
3 actionable tasks: 3 executed
oh I didn't know you got access to them
well you still have the same issue with quotes