• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

How to write to a file in java when the code is deployed in oracle

I have a java program that I have deployed with jDeveloper to Oracle database. Is it possible to write to a file in java (fileoutputstream) when the code is in oracle. I use a pl/sql to call the program. Can I use UTL file when I am not writing to the file in the pl/sql?

Thanks
Bjorn
0
bjornhel
Asked:
bjornhel
1 Solution
 
exorcistCommented:
If the code is running in your Oracle Database, I am pretty sure that it is a misdesign if you need a file to write to now. You have a database. Can't you just store your data there?
0
 
graf27Commented:
of corse, it is possible. we have tested the java.io package inside the jserv environment. so you can create, delete files outside the oracle database. sometimes i also use the jserv engine to write i.e logs from different instances to one system-file.
To call your java-programm inside the database, you need a pl/sql wrapper function/package.
If you hava one database instance, you can call directly the utl_file package to write files in the system environment. but therefore you must first create an directory link.
0
 
sudhakar_koundinyaCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to graf27]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now