Jpcap mac 开发环境搭建
如下为官方文档叙述:
Mac OS X
Both Java and libpcap are preinstalled on Mac OS X.
If any of them is missing you should be able to install them from the Mac OS X install DVD.
Download and install Xcode.
The default installation of Xcode should provide you with the toolchain required for compiling Jpcap.
Download and extract Jpcap source build.
Go to ‘[Jpcap extracted directory]/src/c’ directory.
Run ‘make’.
Copy ‘libjpcap.jnilib’ to ‘/Library/Java/Extensions/’ directory.
Copy ‘[Jpcap extracted directory]/lib/jpcap.jar’ to ‘/Library/Java/Extensions/’
Or, place ‘jpcap.jar’ to any directory and include it to your CLASSPATH.
预装软件:
1.安装Xcode 及 install 。 否则mac OS 没有make 环境;
2.安装libjpcap
在tcpdump网站(http://www.tcpdump.org)下载libpcap的latest release.
解压之后,在软件目录下执行