Win a copy of Spring Boot in Practice this week in the Spring forum!

uniojn qoifazy

+ Follow
since Dec 14, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by uniojn qoifazy

now , i import commons-httpclient.jar

but still get 5 error msg as follow,

Cannot instantiate the type HttpClient
DefaultHttpMethodRetryHandler cannot be resolved to a type
HttpMethodParams cannot be resolved to a variable
The method executeMethod(GetMethod) is undefined for the type HttpClient
The method getParams() is undefined for the type GetMethod

I would greatly appreciate it if you kindly give me some feedback on this
i have import org.apache.http.client.HttpClient;
isn't it ?
hi all,
i tried to connect my router and tried to run the sample code:

I got this error in the console -
HttpClient cannot be resolved to a type
GetMethod cannot be resolved to a type
UsernamePasswordCredentials cannot be resolved to a type

Any ideas what I'm doing wrong?
hi all,
is it possible to to get router status (up or down) in java ?
Can anyone give some examples of this ?

I would greatly appreciate it if you kindly give me some feedback on this
hi Charles Hargrave
i have try to using your method , but still can't get the command results by java
for "-f 5" is mean the output data type and the option is 5 from flow-print
i try to using other option for -f , and the output data is less than "-f 5 ",
so , i think the problem is like you said , generates a lot of screen output, it can fill up the the stderr and stdout streams and cause the process to lock up.
am i wrong ? do you have any idea to solve the problem ?
10 years ago

Charles Hargrave wrote:At the risk of asking a silly question, is there any flow-print command line option for specifying an input file? Is it really required that you use the redirect?

If you have to pipe the file content into the command, there's probably a Java class that can handle that (never used it myself though).

I still think the easiest option would be to put the UNIX commands inside a UNIX shell script and have it accept a parameter for the input file's name (to be used in the UNIX command).

Oh well, it's late. If I think of anything else, I'll post again.

hi Charles Hargrave ,
it's need to use the redirect (<) to input file ,

it's work in java , but when i add "-f 5"

it's failed ,
so , i think Java class that can handle redirect (<) , but i don't know why can't add more parameter (-f 5 ) ??
10 years ago

hi Chuck Buche ,
i have follow your code to modify my code ,

but it's can't work and get some error msg as follows : Broken pipe
at Method)
at sun.nio.cs.StreamEncoder.writeBytes(
at sun.nio.cs.StreamEncoder.implWrite(
at sun.nio.cs.StreamEncoder.write(
at sun.nio.cs.StreamEncoder.write(
at flowtest.main(

please anyone can help me ?

thanks ,
10 years ago
hi all,

it's just my code , but I can not seem to get it to work. Do I need to do something else or is there a better way.
but if i don't add "-f 5 " to cmdlinux[2] = "/usr/bin/flow-print -f 5 <"+path; , it's will work successful ,
anyone can tell me why ? how to add the parameters "-f 5 " ?

10 years ago
hi all,
i have a binary file that are netflow version 5 record,
anyone can tell me how to parse and print out the data by java ?