Smith, Mike skrev  den 20-03-2007 12:46:
My problem now is that I'm referencing a file in my class, but I'm
getting a 'No such path or directory' error. I know that the path is valid, because I can run successfully within WDSC.
On your Windows machine?

BufferedReader in = new BufferedReader(new
FileReader("\\\\rgc-ad\\Public\\customer Service\\Lockbox\\Lockbox
Payment Datafiles\\020707P.txt"));
FileReader basically uses the underlying operating system to resolve the name. The path you have used in your code is Windows specific (and refers to a file on the RGC-AD machine), and is not valid on a non-Windows host.

If the file is located on the AS/400 you should identify its local name and use that instead.

If the file is located on another host, you need to use code that knows that. E.g. JTopen knows how to talk to a remote AS/400.

In case this is a frequent scenario you might want to start use an URL to refer to your files. This allows you to use many different protocols to access them, and to provide your own in case you have a very frequent and cumbersome task.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.