Helo everyone. I want to run my app in windows command prompt, but I have a problem.
When I typed:
"C:\Users\Stefano>java -jar "C:\Users\Stefano\Desktop\My app\My app\dist\My_app.jar"
I recieved:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: com.slyte
chs.library.NativeLibrary.dlopen(Ljava/lang/String;)J
at com.slytechs.library.NativeLibrary.dlopen(Native Method)
at com.slytechs.library.NativeLibrary.<init>(Unknown Source)
at com.slytechs.library.JNILibrary.<init>(Unknown Source)
at com.slytechs.library.JNILibrary.loadLibrary(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at com.slytechs.library.JNILibrary.register(Unknown Source)
at org.jnetpcap.Pcap.<clinit>(Unknown Source)
at my.sniffer.Interface.<init>(interfaceNetwork.java:19)
at my.sniffer.SnifferGUI.<init>(SnifferGUI.java:45)
at my.sniffer.SnifferGUI$9.run(SnifferGUI.java:361)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I understand that there is a problem with finding libraries (external?). Im using jnetpcap, which I showed in netbeans using Run->Set Project Configuration->VM options: "-Djava.library.path="C:\Users\Stefano\Desktop\Java libs\jnetpcap-1.4"
.Winpcap is also installed. Where and how should I put this library to make it visible for application jar file? Or maybe issue is different?
My goal is to run the application using jar file (without IDE, with libs if needed) on any computer.