0

I am using JPCAP code for writing packets in pcap file (I am using JDK 1.7).Here is the code

      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);
         }

instead of saving packets in pcap file.It gives me the following error

       #
       # 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

#

Xara
  • 8,748
  • 16
  • 52
  • 82
  • I solved the same problem yesterday. Have you read this ? Is it relevant ? http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs – Tom May 17 '12 at 16:40
  • @Tom can u please guide me how u solved this problem.... – Xara May 18 '12 at 12:10

0 Answers0