File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply 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: 14607

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: 32769
Make sure you follow all the advice given in this article.


Android appsImageJ pluginsJava web charts
 
 
subject: Wireshark connectivity using java and string compare from text file
 
Threads others viewed
Need help on Regular Expression
Writing to files using socket server
Reading a large text file
package javax.servlet.annotation does not exist
FileReader / BufferedReader will only read the first line from the file
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com