taycaldwell / riot-api-java

Riot Games API Java Library
http://taycaldwell.github.io/riot-api-java/
Apache License 2.0
190 stars 73 forks source link

NoClassDerFoundError ? #134

Closed pams95 closed 6 years ago

pams95 commented 6 years ago

Hello, To begin my apologies for my bad English.. I try to use this API and when I launch my app, the terminal give me this : Exception in thread "main" java.lang.NoClassDefFoundError: net/rithms/riot/api/RiotApi at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: net.rithms.riot.api.RiotApi at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more I need to know why i get this error while I use maven and there is no error on the pom.xml : https://hastebin.com/laqefisife.xml Thanks for your help ! Pams_95

drunderscore commented 6 years ago

What IDE are you using? And are you executing the JAR from Maven or your IDE?

pams95 commented 6 years ago

I use eclipse and I run the api with maven

drunderscore commented 6 years ago

When you want to package your project from Maven, you need to use a plugin to make it executable. See this answer from Stack Overflow on how to do such.

pams95 commented 6 years ago

I know but i launch the program with eclipse

pams95 commented 6 years ago

U need to know that i have an Other plugin on maven and there was no problem with him when I didn’t install riot api

pams95 commented 6 years ago

nobody can help me ?