aspose file tools*
The moose likes Threads and Synchronization and the fly likes Wireshark connectivity using java and string compare from text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Wireshark connectivity using java and string compare from text file" Watch "Wireshark connectivity using java and string compare from text file" New topic
Author

Wireshark connectivity using java and string compare from text file

Riddhi Kakadia
Greenhorn

Joined: Dec 07, 2009
Posts: 1
Hi All,

I am trying to write a code which does following things:

1. capture wireshark traces
2. convert pcap file to text file
3. search string from that text file
4. stop taking wireshark traces

I have implemented it as below:


The problem is with line //problem here. I want to run traces in background.
I want to modify the above code so that,

-->start wireshark traces
-->do something like (open browser and open webpage)
-->stop wireshark
-->compare

But the problem is that //it does not go out from the //problem here line. and so i cannot go to the next step. Any ideas on implementation?

Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18709
    
  40

Riddhi Kakadia wrote:

But the problem is that //it does not go out from the //problem here line. and so i cannot go to the next step. Any ideas on implementation?



Not sure if this question is even thread related.

Is the issue related with being able to call runtime.exec()? Or is the question about starting a thread to do so. If the first, then this is not a thread question. If the second, then what is the issue? The example doesn't start a separate thread at all.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
Make sure you follow all the advice given in this article.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wireshark connectivity using java and string compare from text file