This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 5
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: 20029
    
  44

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
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Make sure you follow all the advice given in this article.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wireshark connectivity using java and string compare from text file
 
It's not a secret anymore!