I have my Jabber client, which is working very well. I want to compile it into a executable jar file, so the client can be run from outside eclipse.
When i compile it, and the jar file is done, i double click it, and nothing happens. The process is quickly starting up, and then closing.
Ive spent hours, figuring out what the problem could be, trying to exclude some classes and so on.
And the conclusion is this:
The class ConnectFunction, has 3 methods, with 3 strings, which make this problem occur. The 3 classes are and the 3 strings are:
connection = new XMPPConnection(SERVER_IP);
public void getRoster(String username)
lots of presence code
private void startListener()
So if i have my hole complete client, and remove these 3 lines from the classes (including the presence code in the getroster), the jar starts, and the gui shows. The program, of course, doesent work.
Does any of you know why these lines can ruin the application? Because of the connection = new XMPPConnection(SERVER_IP);, I thought it might could be because of security reasons in java. But the other lines arent even initialized when the program starts (the connection is though).
Really hope you can help!
— UPDATE -
Ive may be on the right track. Ive managed to get the “Exception in thread “main” java.lang.NoClassDefFoundError: /org/jivesoftware/smack/packetlistener at chatstart.main blabla”
when i run the jar
So maybe it is a classpath error? Im using eclipse, and the classpath/build path seems fine.
Hope somebody can help…
Message was edited by: Farsen