I have a java class that running in as400 application server. I want to read from a excel file in the local pc (C:/abc.xls or //as400sys/approvals/qdls/abcflr/abc.xls) . my java class don't see my excel file in C:
Software/Hardware used:
ASKED:
March 22, 2011 4:12 PM
UPDATED:
April 15, 2011 1:44 PM
…running in as400 application server.
According to that, your Java program is running on the AS/400.
I want to read from a excel file in the local pc (C:/abc.xls or //as400sys/approvals/qdls/abcflr/abc.xls) .
And according to that, you are expecting to read either from the C: drive or from a Windows Network share of a folder in your AS/400′s QDLS file system..
my java class don’t see my excel file in C:
Since your AS/400 doesn’t have a C: drive, your Java will never find a C: drive if it runs on the AS/400. You would have to share your C: drive out to the Windows Network and have a Windows profile and password defined on your PC that matches the profile and password that your Java runs under. Your AS/400 would need to be configured to connect to the same Windows domain that your PC shares into. Then, the path would need to be specified as a /QNTC path out to your PC,s share name.
For the //as400sys/approvals/qdls/abcflr/abc.xls path, you should try simply /qdls/abcflr/abc.xls, but that’s not a good idea. Your file shouldn’t be in the /QDLS file system; it should be in a directory under the /root file system instead. There are too many difficulties in connecting Java with /QDLS, not to mention the poor performance issues and near obsolescence of /QDLS. (Actually, you’d be better off never using /QDLS again.)
Tom
Could be a good time to ask your your teacher in the classroom.