Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Java Concurrent Program

sparrowDCLXVIFeb 29 2012 — edited Feb 29 2012
Hi all

I have a JCP that's working as I require, apart from one small issue.
I want to open a file, read the contents, and then process them. I do this as follows:

fileReader = new FileReader("/d01/oracle/visappl/file.txt");

This works when I hard code the full path. However, when I try to use an application relative path, it doesn't work:

fileReader = new FileReader("$APPL_TOP/file.txt");
I get a file not found error.

$APPL_TOP is a virtual directory that the Oracle database understands. It is OS independent, in that the database will know where it points to in the OS.

Has anybody done this before?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2012
Added on Feb 29 2012
2 comments
355 views