Topic: jpcap问题 |
Print this page |
1.jpcap问题 | Copy to clipboard |
Posted by: yikaikai Posted on: 2007-03-15 20:43 编译的时候总是出现: class file has wrong version 49.0, should be 48.0 我用的是j2sdk1.4.2, jpcap1.6 换了个j2sdk1.4.1还是这样 |
2.Re:jpcap问题 [Re: yikaikai] | Copy to clipboard |
Posted by: JiafanZhou Posted on: 2007-03-16 22:24 hmmm.... I just included the jpcap jar in my classpath, then you can use the Jpcap classes. Show me the steps you did and gave you the compile error. BTW, JPcap is a good tool for the Java language to bypass the TCP/IP stack. Following are some notes I had when I use Jpcap, however I am not particular happy with the JPcap source code. You can see that the author is a purely C/C++ developer. Description: Jpcap is a Java class package that allows Java applications to capture and/or send packets to the network. Jpcap is based on libpcap/winpcap and Raw Socket API. Therefore, Jpcap is supposed to work on any OS on which libpcap/winpcap has been implemented. Jpcap supports the following types of packets: 1) Ethernet 2) IPv4 3) IPv6 4) ARP/RARP 5) TCP 6) UDP 7) ICMPv4 Other types of packets are captured as raw packets (i.e., instances of the Packet class) which contains the whole data of the packets. This allows Java applications to analyze unsupported packet types. --------------------------------------------------------------------- Requirements: - Java 2 SDK - libpcap version.0.9.4 or higher [url] http://www.tcpdump.org [/url] OR - winPcap version.3.1 or higher [url] http://winpcap.polito.it/ [/url] --------------------------------------------------------------------- Installation: 1) Copy "lib\Jpcap.dll" into "[JRE directory]\bin" or "[JRE directory]\lib\ext\x86" 2) Copy "lib\jpcap.jar" into "[JRE directory]\lib\ext" 3) If you installed JDK, you also need to copy "lib\jpcap.jar" into "[JDK directory]\jre\lib\ext". --------------------------------------------------------------------- Follow my instructions, and you shall not find any problem. Regards, Jiafan |
3.Re:jpcap问题 [Re: HenryShanley] | Copy to clipboard |
Posted by: yikaikai Posted on: 2007-03-19 16:49 thank you, I change JDK to 1.5 and now it's ok |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |