I seem to have a strange issue which is most likely to be caused by not understanding how the including of additional libraries in java work.
I wrote a program that uses jnetpcap.jar
to work with pcap files. The application is running fine when I start it from eclipse and has also worked many times by exporting a runnable jar (copying required-libraries to sub-folder). It even worked on other computers.
As mentioned in jnetpcap doc, the computers running windows have put jnetpcap.dll
into C:\Windows
(according on every machine the x86 or x64 dll)
Anyhow, the following scenario is reproducable on my and other machines:
- running the complete eclipse project works
- running from cmd with
java -jar pcapdump.jar
works double-click jar
the gui etc. works - but the "main work" is not done, so no pcap file is used.
I don't see any errors in my logs.
Configuration in eclipse:
- added an external user library. pointing to my local jnetpcap.jar and source-jar.
When exporting as runnable-jar with copying libs to sub-folders the jnetpcap.jar gets copied into a separate sub-folder. Like I did it many times before.
Anyhow the described problem exists today and I don't know what I am doing wrong or what may be wrong.