style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7505528228218001"
data-ad-slot="1225241371">

1.5.2.1 - gentoo

Commands to install development environment on a blank Gentoo install. Note there are no installable jnetpcap packages at this time, but the libraries can be generated using the following procedure:

Executed as root (user "mark" is only used as an example, replace with your own username):

  1. emerge dev-java/sun-jdk
  2. emerge net-libs/libpcap
  3. emerge gcc
  4. emerge ant
  5. emerge dev-java/ant-nodeps (needed for "javah" task)
  6. (optional) install junit for running the ant "test" target
    emerge dev-java/junit
  7. emerge subversion
  8. (optional) Create user if you don't have an account (use your own user name):
    useradd -m mark
    and assign a password:
    passwd mark
  9. su - mark
  10. Checkout source code (complete details):
    svn co https://jnetpcap.svn.sourceforge.net/svnroot/jnetpcap/jnetpcap/trunk jnetpcap
    
  11. As root run jUnit testcases to make sure everything compiles correctly. Tests need to be run as root, as some of the tests check interface parameters that require root privilege:
    su
    ant clean test
    #if everything tested OK
    exit
    
  12. ant clean build-jar comp-jni

Currently jNetPcap does not provide a emerge package that can be fully installed on Gentoo platforms. However the above instructions will install necessary build environment to compile both native and java libraries. The compiled libraries are left in the following location build/lib. The file libjnetpcap.so.* should be installed under /usr/lib directory. The java library jnetpcap-X.Y.*.jar should be installed under /usr/java directory.

This example assumes that we are taking a snapshot of the latest state of the development trunk (SVN trunk) which is assigned a build number (defined in file build.number in jnetpcap working directory). Build numbers are incremented after each official or internal build by jnetpcap builders.