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 jpcoxey001@yahoo.com
John Coxey
Evansville, Indiana, USA
Scott Minor
Greenhorn
Joined: Nov 05, 2001
Posts: 5
posted
0
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 jpcoxey001@yahoo.com
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
Joined: Oct 24, 2000
Posts: 503
posted
0
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 jpcoxey001@yahoo.com
Sunil Dumpala
Greenhorn
Joined: Jul 28, 2005
Posts: 29
posted
0
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