Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 16th, 2005, 3:49 PM   #1
ryanl
Newbie
 
Join Date: Aug 2005
Posts: 1
Rep Power: 0 ryanl is on a distinguished road
reading in a file in java

How exactly can I go about reading in a file in java? I know how to do in C so that I can just drag the file onto the binary of the program and whatnot, but my knowledge of java is limited at best.


Basically what I am trying to do is write a little program to manipulate a txt file that I drag on to the java program.
ryanl is offline   Reply With Quote
Old Aug 16th, 2005, 7:20 PM   #2
skuinders
Hobbyist Programmer
 
skuinders's Avatar
 
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4 skuinders is on a distinguished road
http://www.mathcs.carleton.edu/facul...3/iocheat.html

for more information on the classes used there, check out: http://java.sun.com/j2se/1.5.0/docs/api/
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand."
- B. Russell

http://web.bryant.edu/~srk2
skuinders is offline   Reply With Quote
Old Aug 25th, 2005, 1:39 AM   #3
seeteshh
Newbie
 
Join Date: Aug 2005
Posts: 2
Rep Power: 0 seeteshh is on a distinguished road
Use java.io package.

If ur interested in some sample examples let me know
seeteshh is offline   Reply With Quote
Old Sep 8th, 2005, 9:54 AM   #4
proghelper
Newbie
 
Join Date: Jun 2005
Posts: 16
Rep Power: 0 proghelper is on a distinguished road
String sFileName = c_sFilePath + c_sFileName;
File fFile = new File(sFileName);
proghelper is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:26 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC