• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

WSAD - How to read/find text file.

 
Ranch Hand
Posts: 503
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All:
- I am trying to read a simple text file in WSAD v5.0
- Some questions?
1. Does the text file need to be in a *.jar file?
2. Where should I put the text file?
3. What about the classpath? Do I need to set it?
4. What would the line of code look like to be able to find/read the text file?
---------
I've been playing with this for a week now, and the IBM documentation is all over the place on this one.
Any help would be appreciated.
Thanks,
John Coxey
[email protected]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Coxey:
All:
- I am trying to read a simple text file in WSAD v5.0
- Some questions?
1. Does the text file need to be in a *.jar file?
2. Where should I put the text file?
3. What about the classpath? Do I need to set it?
4. What would the line of code look like to be able to find/read the text file?
---------
I've been playing with this for a week now, and the IBM documentation is all over the place on this one.
Any help would be appreciated.
Thanks,
John Coxey
[email protected]


John,
What are you really trying to do. All you need to do is know where the file is and java will open it. I have a program that ftp's a file from a remote location and then opens the "TXT" file and processes it.
 
John Coxey
Ranch Hand
Posts: 503
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott:
- I am trying to read in a Properties file.

- Problem is where do I put the file "somefile.dat"?
- The next problem, how do I set the classpath in WSAD so that I can find "somefile.dat".
- Note: The java program above as well as "somefile.dat" are located in the same WSAD project.
--------
Can anyone answer the above?
Scott, does this help?
Thanks,
John Coxey
[email protected]
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John,

I am facing a similar problem. I am not sure where to place my properties file. I tried putting it in Project>properties>Java Build Path > Libraries

But with no use. Have you figured out what needs to be done for this? Any help would be appreciated.
Thanks,
Sunil
 
Sunil Dumpala
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never mind I figured it out. Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic