The program works in eclipse with libraries, but not when extracting in jar

I created a Java project using Eclipse using the jnetpcap library for which WinPCap must be installed for it to work properly. However, there is no winpcap library included in my project only jnetpcap. But when I extract the project to the generated jar with libraries or with libraries in another folder, it somehow does not work. Why does everything work when I run the program from eclipse, but not as an extracted project?

Thanks in advance.

+4
source share
3 answers
+2

? , .jar, eclipse. .

+1

You have not declared your main class for the jar file. Right click on your solution in eclipse-> Run as-> Run configuration → Main class → select main class. Now create your jar from the very beginning and try to complete it.

0
source

Source: https://habr.com/ru/post/1667480/


All Articles