nuz1
asked on
Specifying UNIX path in java properties file
Hi,
I wonder if an expert can assist.
I need to specify a unix path coreectly in my properties file sitting on my C drive, as I need
to read a flat file from UNIX I know I can't just do;
/home/johno/myfile.txt
and some escaping sequence is required.
Many thanks
I wonder if an expert can assist.
I need to specify a unix path coreectly in my properties file sitting on my C drive, as I need
to read a flat file from UNIX I know I can't just do;
/home/johno/myfile.txt
and some escaping sequence is required.
Many thanks
ASKER
hmm,
Sorry its a unix path ie \home\johno\myfile.txt ! it did not work
that did not work , I was told to use something like \\home\\johno\\myfile.txt
What do ya say?
Thanks.
Sorry its a unix path ie \home\johno\myfile.txt ! it did not work
that did not work , I was told to use something like \\home\\johno\\myfile.txt
What do ya say?
Thanks.
> Sorry its a unix path ie \home\johno\myfile.txt ! it did not work
try it as you stated originally in your question
how is it being used?
try it as you stated originally in your question
how is it being used?
ASKER
Sorry corrction
/home/johno/myfile.txt
is the unix path!
but my code don't like it
do I need //home//johno//myfile.txt ?
/home/johno/myfile.txt
is the unix path!
but my code don't like it
do I need //home//johno//myfile.txt ?
ASKER
By the way it work fine if I use a foile on my C drive and specify
c//testarea//mytext.txt
c//testarea//mytext.txt
how exactly does your code not like it?
ASKER
Just a minute getting error message..
ASKER
Caused by: java.io.FileNotFoundExcept ion: \test\dyn\data\gsbl\TESTT1 main\app\d ata\instru ment_20040 917_v4.dat (The system cannot find the path specified)
ASKER
Hi Objects can idea?
ASKER
correction , sorry any idea?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the confusion
As you know, UNIX paths are like :
/test/dyn/data/gsbl/TESTT1 main/app/d ata/instru ment_20040 917_v4.dat
When I put that in I get:
Caused by: java.io.FileNotFoundExcept ion: \test\dyn\data\gsbl\TESTT1 main\app\d ata\instru ment_20040 917_v4.dat (The system cannot find the path specified)
So please please clarify how this should be specified in properties (its an XML file .
)
OK if I put this in properties I get
As you know, UNIX paths are like :
/test/dyn/data/gsbl/TESTT1
When I put that in I get:
Caused by: java.io.FileNotFoundExcept
So please please clarify how this should be specified in properties (its an XML file .
)
OK if I put this in properties I get
What are you running this on? I don't see how the file separators are changing.
ASKER
I'm running the the java in IBM Websphere app server (out of container). As a java client (all on my PC). Need to read the file from UNIX.
sounds like you are looking at the local system for a file that would be located on the server. You will need to give the path to the server (the UNIX computer) for the program. The best would be to give it in a URL format. So, of course it is saying that the file is not found on the client (where you are currently looking), because you need to look in the server.
ASKER
Hi could you please show how to specify it in URL format given the UNIX file is:
/test/dyn/data/gsbl/TESTT1 main/app/d ata/instru ment_20040 917_v4.dat
thanks very much.
/test/dyn/data/gsbl/TESTT1
thanks very much.
is the unix file system mounted?
How is the client expected to access the Unix server?
How is the client expected to access the Unix server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> /home/johno/myfile.txt
That could be fine, how is the path used in your app?