Thanks for the reply.  

The RGC_AD is a windows server. 
I'm not sure I totally understand what you mean here. 
--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.

Can you provide me with an example?  

Java class resides in IFS, being called from CL program, accessing a file on a 
windows server. 

Thanks.

Michael Smith
iSeries.mySeries.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On 
Behalf Of Thorbjørn Ravn Andersen
Sent: Tuesday, March 20, 2007 10:00 AM
To: Java Programming on and around the iSeries / AS400
Subject: Re: RUNJVA problems


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.