Installation of JNetPcap is dependent on the installation of WinPcap Library (The libpcap library for Windows).
Now Once the WinPcap Setup is installed, you can now download the binaries required for the download of JNetPcap.
(Note: Is it advised that 32 bit Eclipse Users also download the 32 bit version of Download Package(x86 version)).
Once all three files are downloaded. UNPACK them into a preffered location so that they can be easily linked with the Eclipse IDE
- Copy the jnetpcap.dll to both windows/system and windows/system32 (to be on the safe side)
- Now open Eclipse as Administrator.
- Go to Window->Prefrences
- Java->Build Path-> User Libraries
- Select “New”
- Name the Library “JNetPcap”
- Then Add Jar file i.e “jnetpcap.jar” from the download package folder.
- Expand the Jar file “jnetpcap.jar”
- Click on Source attachment and Select “Edit”. After that select the folder in which the source files are present e.g “jnetpcap-src-1.3.0-1″.
- Click on Java Doc location and Select “Edit”.After that select the folder in which the java docs are present e.g “jnetpcap-javadoc-1.3.0-1″.
- Now select Native Library location and Select “Edit”. Select the folder where the initial Download Package is present.(In which the “include” folder is present).
- Select OK.
configure JnetPcap in java project
- right click your project name (for example "capture")
- select "build path"->"configure build path..."
- select Libraries,select "jnetpcap.jar"
- click ok
Then, you will see "jnetpcap.jar" in Referenced Libraries. Now jnetpcap is include in your project
You have successfully installed JNetPcap. Now all you have to do is include the User library in your project.
本文详细介绍了在Windows上安装JNetPcap的步骤,包括先安装WinPcap库,然后下载JNetPcap的二进制包、源代码和JavaDoc,并将jnetpcap.dll复制到系统目录。接着,在Eclipse中新建用户库,添加jnetpcap.jar,并配置源代码和JavaDoc路径。最后,将库添加到Java项目中,完成JNetPcap的安装。
2万+

被折叠的 条评论
为什么被折叠?



