#java.lang.NoClassDefFoundError: org/json/JSONObject

1 messages · Page 1 of 1 (latest)

rotund canyon
#

I am using the JSONObject, it works on Intelij, but when i create the .jar and test it, i get that error, my dependency is correctly on gradle

dependencies {
implementation group: 'org.json', name: 'json', version: '20220924'
}

so i dont know what is happening

oak solarBOT
#

This post has been reserved for your question.

Hey @rotund canyon! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed 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.

#

<@&765578700724371486>

Requested by Tener#7838
still latch
#

you need to package dependency with your jar

rotund canyon
still latch
rotund canyon
#

thanks my fellow mate

#

@still latch now the build fails

#
FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\keven\OneDrive\�rea de Trabalho\BossesConfig\build.gradle' line: 203

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not get unknown property 'compile' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

* 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

BUILD FAILED in 2s
#

my gradle is