/    Sign up×
Community /Pin to ProfileBookmark

jave program to read a file

Hi all,
Earlier I posted this message to get help from java-script developer but Khalid told me that this problem could be solved using java program. So, I am posting this message here to get help from all of you.

I have an application (monitoring software) running on windows XP. It captures information from several machine and shows results in four columns: computer – user – running application – URL (I do not know how the developer has developed these columns in the application using which software) This software is available here: ([url]http://www.systracker.com/Network_Monitor.asp)[/url]. I want to write a program that can read a file generated by this software and I want to display results in a graph showing that how many application in total running. For example, I want to see how many users are currency running ms.word. (eg., 30%).
Please let me know if anybody has any idea how to deal with this or can give me a sample program. I will be highly thankful to you.

Cheers,
Rahat

to post a comment
Java

3 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliApr 08.2005 — Here is a simple method that will read a file.

Make sure that path to file is a valid one.

[code=php]
/**
* Simple method that will read a file.
* @param filePath
*/
public void readFile(String filePath){
if(null!=filePath && !filePath.equals("")){
filePath = fileName;
}

try{
BufferedReader br = new BufferedReader(new FileReader(filePath));
String line = "";
while((line = br.readLine())!=null){
System.out.println("LINE: "+line);
}
}catch(java.io.IOException ioe){
ioe.printStackTrace();
}
}
[/code]
Copy linkTweet thisAlerts:
@r_iqbalauthorApr 08.2005 — Thank you, Khalid for your help.
Copy linkTweet thisAlerts:
@r_iqbalauthorApr 08.2005 — Thank you, Khalid, for your help.
×

Success!

Help @r_iqbal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.11,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...