hey there
I’‘m writing an IM client with the smack api. I’'m also using the file transfer function. The app runs well in eclipse, but when I export it as a jar file i get this:
Exception in thread “main” java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.simontuffs.onejar.Boot.run(Boot.java:247)
at com.simontuffs.onejar.Boot.main(Boot.java:105)
Caused by: java.lang.NullPointerException
at org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.setServiceEnabled(F ileTransferNegotiator.java:119)
at org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.getInstanceFor(File TransferNegotiator.java:100)
at org.jivesoftware.smackx.filetransfer.FileTransferManager.(Client.java:92)
at client.control.Client.main(Client.java:399)
… 6 more
why does it work in eclipse, but not within the jar file? The smack and smackx.jar are included in the project