JPCAP:EXCEPTION_ACCESS_VIOLATION

时间:2012-05-17 16:35:52

标签: java exception jpcap

我正在使用JPCAP代码在pcap文件中写入数据包(我使用的是JDK 1.7)。这是代码

      JpcapCaptor captor=JpcapCaptor.openDevice(device[index], 65535, false, 20);
       //open a file to save captured packets
            JpcapWriter writer=JpcapWriter.openDumpFile(captor,"yourfilename");

                for(int i=0;i<10;i++){
         //capture a single packet
         Packet packet=captor.getPacket();
        //save it into the opened file
              writer.writePacket(packet);
         }

而不是在pcap文件中保存数据包。它给我以下错误

       #
       # A fatal error has been detected by the Java Runtime Environment:
        #
         #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x01cf675d, pid=5564,  tid=4876
        #
        # JRE version: 7.0-b141
        # Java VM: Java HotSpot(TM) Client VM (21.0-b11 mixed mode, sharing windows-x86 )
        # Problematic frame:
        # v  ~BufferBlob::jni_fast_GetLongField
          #
        # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

0 个答案:

没有答案