TheHolyWaffle / TeamSpeak-3-Java-API

A Java wrapper of TeamSpeak's 3 server query API.
MIT License
306 stars 107 forks source link

Teamspeak3-api-1.0.14.jar Not working in my Project #247

Closed Veqtive closed 6 years ago

Veqtive commented 6 years ago

Hey TheHolyWaffle, I'm using your API to develop a TeamSpeak 3 Admin Server Query. After finishing it, I exported it and got this error after trying to start it:

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/theholywaffle/teamspeak3/TS3Config at me.felix.Load.(Load.java:11) Caused by: java.lang.ClassNotFoundException: com.github.theholywaffle.teamspeak3.TS3Config at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more

I've already googled a much but couldn't find anything. If I start it directly in Eclipse it's working

somefriggnidiot commented 6 years ago

Can you please go into a little more detail on the process you followed to import the library and export the project?

Kakifrucht commented 6 years ago

How did you start it? In the IDE or in an .jar artifact? If it is the latter the compiled file did not properly include the API.

Veqtive commented 6 years ago

I used Build Tools and Add External Jars, imported the jar(Right Click -> Build Path -> Configue Build Path -> Add Exxternam Jars) and just exported my project as a Jar file (Right Click -> Export -> JAR file -> 3x Next -> Main class -> Browse... -> -> OK and Finish). Without using "Specify the manifest" Linux can't find a manifest, so I have to do this.

P.S. I'am NOT using Maven because I don't know how to use it

somefriggnidiot commented 6 years ago

In Eclipse:

File -> Export -> Runnable JAR File Set Launch Configuration and Export Destination as applicable, set library handling to "Package Required Libraries into generated JAR." Finish

I strongly encourage you to learn Maven, as it's an incredibly valuable tool and makes managing dependencies incredibly simple. You can find a quick-start guide on Apache's Website, and you're more than welcome to ask me any questions you might have about it on Gitter.

Veqtive commented 6 years ago

THANKS!!! I've always thought that I have to export it as an JAR file. THANKS THANKS. Now everything's working