如何将jcap.jar及其Javadoc添加到Netbeans [英] How to add jcap.jar and its Javadoc into Netbeans

查看:158
本文介绍了如何将jcap.jar及其Javadoc添加到Netbeans的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要添加jpcap.jar,路径是这样的:

i want to add jpcap.jar the path is this:

C:\WINDOWS\Sun\Java\lib\ext

该怎么做?

import java.lang.ClassLoader;

需要吗? 或:

  System.loadLibrary('what must be in here?');

或:

System.load(???);

假设此代码:

public void receivePacket(Packet packet) {
System.out.println(packet);
if (packet instanceof IPPacket) {
IPPacket ipp = (IPPacket)packet;
InetAddress dest = ipp.dst_ip;
InetAddress src = ipp.src_ip;
System.out.print(src);
System.out.print(dest);
 }

主要我有这个:

s.receivePacket(Packet.EOF);

s.receivePacket(Packet.EOF);

但它返回:

0.0

我用右键单击添加库添加了库,但是我认为它不起作用,原因是: 选择包时我有这个

i added library with rightclick add library but i think it doesn't work cause: i have this when selecting packet

找不到Javadoc.此项的Javadoc文档不存在,或者您没有在Java Platform Manager或Library Manager中添加指定的Javadoc

Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager

推荐答案

在这里,您将找到有关如何添加jcap.jar的答案:

Here you will find the answer on how to add jcap.jar: how-to-add-library-files-in-netbeans.

缺少javadoc并不意味着您尚未添加库本身,因为javadocs通常位于单独的jar或zips中.

The absence of javadoc doesn't mean that you haven't added the library itself, because javadocs are usually in separate jars or zips.

如果使用库方法的代码已编译,则问题出在没有库的情况下.

If the code that uses library method is compiled, than the problem is not in the absence of library.

通常,任何Java库的源代码,二进制文件和javadoc都包含在单独的jar文件,zip文件或文件夹中.

Usually, the source code of any java library, the binary files and javadoc are contained in separate jar-files, zip-files or folders.

更新: 解决方法是:

  1. 此处下载jpcap-xxzip ;
  2. 将其解压缩到您喜欢的任何文件夹中;
  3. 将已解压缩文件夹的 doc/javadoc 子文件夹添加到库管理器中的库中.
  1. download jpcap-x.x.zip from here;
  2. unzip it to any folder you like;
  3. add the doc/javadoc subfolder of unzipped folder to your library in library manager.

视频使用方法.

这篇关于如何将jcap.jar及其Javadoc添加到Netbeans的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆