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

Posted on 2001-06-11
Last Modified: 2010-03-31
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?

Question by:bjornhel

Expert Comment

ID: 6177360
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?

Accepted Solution

graf27 earned 50 total points
ID: 6180856
of corse, it is possible. we have tested the 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.
LVL 14

Expert Comment

ID: 9027539
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.
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.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now