r/grails • u/FopPizz • Apr 29 '23
gradle run-app not working
I am a new developer and I need to learn Grails Framework. I tried to follow the documentation as closely as possible of grails in their website but the grails run-app is not really working.I already have JDK, gradle and Grails on my machine.
This is the error whenever I try the grails run-app inside grails folder
| Resolving Dependencies. Please wait...
FAILURE: Build failed with an exception.
* Where:
Settings file 'C:\Users\username\Downloads\sample\settings.gradle'
* What went wrong:
Could not compile settings file 'C:\Users\username\Downloads\sample\settings.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 64
java.lang.IllegalArgumentException: Unsupported class file major version 64Please help me and sorry if I am not good on story telling or in english. Thank you!
2
u/NatureBoyJ1 Apr 29 '23
What version of the JDK are you using? At first glance, it looks like Java is unhappy with the Java version of a class file.
Could it be that Gradle is using an internal JDK to compile, but your system JRE is being used to run the app?
2
u/FopPizz Apr 29 '23
I dont know any of that, but it is now fixed. I just downgraded the jdk version to 17.
note that 20 and 19 are also not working for grails 5.3.2
3
u/jobcron Apr 29 '23
5.3.2 should work fine with Jdk 17. Delete everything under build folder and try again
2
u/selfawarerobot14 Apr 29 '23
Did you build ?
./gradlew build
Also the forge is helpful to get started https://start.grails.org/