How to install jpcap

<Microsoft Windows>

  1. Download and install Java Runtime Environment 6 (if you want to simply run Jpcap-based applications) or JDK 6 (if you want to develop Jpcap-based applications).
  2. Download and install the latest WinPcap.
  3. Download and run Jpcap Self Installer for windows.
If you have the previous version of Jpcap, please uninstall it first before installing a new version.
If you forgot to uninstall the previous version, search 'Jpcap.dll' and 'jpcap.jar' from your system, delete them, and then install a new version.

 

It is recommended to use JRE/JDK 6 or higher because Jpcap installer assumes JRE/JDK 6.
If you are using JRE/JDK 5, set your 'CLASSPATH' to include '%SystemRoot%\Sun\Java\lib\ext'

<Linux>

Use RPM package (Fedora, RedHat)

Download and install Jpcap RPM package.
For some distributions (e.g., Mandriva), JDK6 is also installed automatically.
However, for some distributions (e.g., Fedora Core), you have to manually install Sun's JDK6 for Linux as a RPM package before installing Jpcap RPM package.

Use Debian package (Ubuntu, GNU/Debian)

Download and install Jpcap Debian package.
For some distributions (e.g., Ubuntu), JDK6 is also installed automatically.
For some distributions (e.g., Debian GNU/Lunux), you may have to edit apt-line (e.g., include "no-free") before installing Jpcap Debian package. Also, you may have to update your GLIBC to version 2.4 or higher.

If you cannot install using RPM/Debian package, you can try to build from the source.

It is recommended to use Sun's JRE/JDK 6 or higher because Jpcap package assumes JRE/JDK 6.
If you are using JRE/JDK 5, set your 'CLASSPATH' to include '/usr/java/packages/lib/ext'
Also, Jpcap currently does not work with gcj / gij, so please use Sun's JRE/JDK.

<Mac OS X>

  1. 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. 
  2. Download and install Xcode.
    The default installation of Xcode should provide you with the toolchain required for compiling Jpcap.
  3. Download and extract Jpcap source build. 
  4. Go to '[Jpcap extracted directory]/src/c' directory. 
  5. Run 'make'.
  6. Copy 'libjpcap.jnilib' to '/Library/Java/Extensions/' directory. 
  7. Copy '[Jpcap extracted directory]/lib/jpcap.jar' to '/Library/Java/Extensions/'
    Or, place 'jpcap.jar' to any directory and include it to your CLASSPATH.


<Source build (Linux/FreeBSD/Solaris)>

  1. Make sure you have 'gcc' and 'make' installed to compile Jpcap.
    Other software/packages may be necessary (for example, you need 'build-essential' package to install on Ubuntu).
  2. Download and install libpcap (ver.0.9.4 or later) if not installed.
  3. Download and extract Jpcap source build.
  4. Go to '[Jpcap extracted directory]/src/c' directory.
  5. Run 'make'.
  6. Copy 'libjpcap.so' to '[Java installed directory]/jre/lib/<arch>'. <arch> is either 'i386' or 'sparc'.
    Or, if you are using Java 6, copy 'libjpcap.so' to '/usr/java/packages/lib/ext'.
    Or, place 'libjpcap.so' in the directory where your application is located.
  7. Copy '[Jpcap extracted directory]/lib/jpcap.jar' to '/usr/lib' or '[Java installed directory]/jre/lib/ext'.
    Or, place 'jpcap.jar' to any directory and include it in your CLASSPATH.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值