Where to store text file in Oracle9iAS created by java.io

Hi,
I am developing an simple application in which i have to create a text file through java.io in Runtime. I am able to create the text file but not able to store the file int he Oracle 9iAS as it is giving the error, Permission denied. I am storing my JSP files in the Oracle Application Server. I want to know the exact place where i can store the text file in Runtime.
Thanks in Advance...
Sivakumar

The test.txt file should be in the 'Run Directory" of your Project. Select Project.jpr and invoke Project settings dialog.
Click on the Runner. You will see the "Run Directory" edit field.
For ex.
package mypackage;
import java.io.*;
public class ReadData
public ReadData()
public static void main(String[] args)
new ReadData();
try{
File fin = new File("test.txt");
if (fin.canRead())
System.out.println("Can read file");
I am geting a error message of file not found. Please advise
in which directory should I place the text file "test.txt" so that the java program can read from it.
Thanks,
agsp

Similar Messages

  • I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly.  I have uninstalled/reinstalled evernote but it still doesn't work.  Anyone know where evernote stores their files on a Mac/

    I am getting an error message with my snap scan ix500 that says the Evernote is not installed properly when I try to transfer it.  I have uninstalled/reinstalled evernote and the scan snap softward but it still doesn't work.  Anyone know where evernote stores their files on a Mac?  Or had this problem.

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

  • How do you CHANGE the location (away from Drive C) where Firefox stores temporary files?

    I know where Firefox stores temporary files. I want to CHANGE this location away from Drive C to decrease writes to an SSD. Thank you.

    Thank you.
    This function may be one of the few things that IE does better than Firefox. IE lets you change the temporary file location in Tools - Internet options - Settings. Firefox developers should make this task easier and put the instructions in the Help file where they can be easily found.
    Since I use an SSD for Drive C, I have learned that any file(s) that are frequently written to should be moved elsewhere to a conventional HDD.

  • What type of files can we create in Java?

    In general what type of files can we create in Java?
    For example, we can create .dat and .txt files as follows:
    DataOutputStream ostream;
    ostream = new DataOutputStream(new FileOutputStream("myfile1.dat"));
    or
    ostream = new DataOutputStream(new FileOutputStream("myfile2.txt"));
    Can we create ASCII?
    Thank you in advance for your answers.

    In general what type of files can we create in Java?You know that a file is nothing more than a series of ones and zeros, with eight of those bundled together as something called a byte. What they actually mean is what you make them to mean. Short: you can write and read any file type you like, but doing that semantically correct it is your responsibility.

  • Where to include Text Files?

    I have am creating a j2me application that requires data access from a text file. I am using netbeans 5.5.1 mobility pack. So can anyone help me out as to where or which folder in the project directory should i store the text files so that i can access them.
    Also is this the syntax to access the file correct?
    InputStream inputstream1 = getClass().getResourceAsStream("dict/mns" + k1);
    the mns.file is a file from which i will be reading my data.
    Thanks in advance

    Which logfile are you refering to ?
    I suggest you check Oracle document to get understanding of Oracle administration.
    Finding logfile could be one of many steps depends on what are you trying to achieve here.
    http://tahiti.oracle.com/

  • To store text file having Multiple file formats in a database table

    Hi,
    Is it possible to store data of a text file which have different field separator between records
    Like
    palash;1111,noida
    xxxx;3333,delhi
    regards
    palash

    Hi,
    Ti load:
    1/ Declare a file with ; separator. Consider you have only to columns
    2/ Create or reverse a datastore with your 3 columns
    3/ Create an interface: file in source, table in target. For you mapping, First column is mapped on the first column of the file, second and thirth ones are parts of the second column of the file...using SQL possibilities of your target DB. For that mapping are made in the workspace.
    You have to know that you have to choice a staging area near your target schema to make those transformations.
    Regards,
    MA...different from RA.... ;o)

  • Text file - carriage return, creating a new line

    anyone know how to create a new line in a text file, something which is the text file equivelent of a BR (html) tag.

    in windows it's "\r\n"
    in linux/unix/bsd it's "\n"
    but the best way to do it is
    //this will return the newline character for whatever
    //platform your program is running on
    System.getProperty("line.separator");

  • How to store text file in MySql database

    Hello Sir/Madam,
    I want to store and retreive text file in mysql database ,Please give some ideas and send me code examples.

    We keep ideas and examples of this issue here:
    http://www.google.com/search?q=mysql+jdbc+clob

  • Where is the text stored when we create a discussion under Urgent Requests?

    Hello,
    Under the Urgent Requests when we create the discussions
    where is the text stored. Under which folder is the text stored? I would like to modify the text. Can anyone help me?
    Thnx in advance.

    hi murali,
    actually discussions are of two types in portal...one you start at any folder or document level and second is you start under ur HOME role in discussion .
    First type of discussion is stored in /collaboration repository and second type of discussion is stored in /discussiongroup repository.   you can find these repository in   content admin -> km content
    hope this will help you.

  • Where to store PDF Files?

    Hello,
    I need to store PDF files on my application server. Where can I put them under the application.
    Thanks in advance

    I think it is a good idea NOT to store it under (== within) your application. That makes updates of the app easier and the pdf's can be maintained without touching the webapp. And vice versa.
    WLS offers you the possibility to link any local drive to a web application. Just define this virtual drive in weblogic.xml :
    <virtual-directory-mapping>
    <local-path>c:\mydir\mypdfs</local-path>
    <url-pattern>/mycontext/*.pdf</url-pattern>
    </virtual-directory-mapping>
    -Kai

  • Where to place    text file in  Jdeveloper9irc  to read from Java program

    For ex.
    package mypackage;
    import java.io.*;
    public class ReadData
    public ReadData()
    public static void main(String[] args)
    new ReadData();
    try{
    File fin = new File("test.txt");
    if (fin.canRead())
    System.out.println("Can read file");
    I am geting a error message of file not found. Please advise
    in which directory should I place the text file "test.txt" so that the java program can read from it.
    Thanks,
    agsp

    The test.txt file should be in the 'Run Directory" of your Project. Select Project.jpr and invoke Project settings dialog.
    Click on the Runner. You will see the "Run Directory" edit field.
    For ex.
    package mypackage;
    import java.io.*;
    public class ReadData
    public ReadData()
    public static void main(String[] args)
    new ReadData();
    try{
    File fin = new File("test.txt");
    if (fin.canRead())
    System.out.println("Can read file");
    I am geting a error message of file not found. Please advise
    in which directory should I place the text file "test.txt" so that the java program can read from it.
    Thanks,
    agsp

  • Webapp - where to store user files?

    Hi All,
    My app is packaged in a WAR file, which gets expanded by servlet container during deployment.
    The app operates with folders containing user data (files uploaded by users, email templates, etc).
    Where should I create these user data folders - inside the webapp directory structure or outside?
    If outside - will I be able to access them from my servlet?
    If inside - how do I protect these folders from overwriting when a new WAR version is expanded?
    What is the best practice in this case?
    Maybe it's a trivial question, but I coudln't find a definite answer... I would really appreciate some help!

    There are a number of solution to your problem:
    1. if you wish to deploy your app using a war file then you will have to package your user data
    everytime you make a new deployment (which resides in your development directory), and if that user date changes then you will have to maintain that change (i.e. in the development and deployment directories)
    so that in your next deployment you don't loose any changes.
    2. If you don't want to maintain changes to your user data in two places, then a simple way is not to deploy
    using a war file. Keep your user data in one place (within your web-app deployment directory), and simply place any changes (html, jsp, and servlet classes) to your application to the appropriate place.
    3. If none of the above approach is suitable then think about maintaing these user data in a database and
    thus be done away with problems relating to directories and files.
    Hi All,
    My app is packaged in a WAR file, which gets expanded
    by servlet container during deployment.
    The app operates with folders containing user data
    (files uploaded by users, email templates, etc).
    Where should I create these user data folders - inside
    the webapp directory structure or outside?
    If outside - will I be able to access them from my
    servlet?
    If inside - how do I protect these folders from
    overwriting when a new WAR version is expanded?
    What is the best practice in this case?
    Maybe it's a trivial question, but I coudln't find a
    definite answer... I would really appreciate some
    help!

  • RH8 and where it stores project files

    Hi all, I'm remotely supporting some colleagues in another country who will be connecting to my RH project via our corporate LAN. The project is in RH8 HTML (webhelp) and using Robo SourceControl 3.1. They're running Win XP SP3 (I know, I know).
    I can get them connected to the project OK in RSC, but when opening the project in RH8 it's taking hours upon hours! The project local store is a local drive e.g. c:\RH8.
    They have admin permission on their PC.
    One thing we noticed is that the files from the C: drive folder are also somehow finding their way into the user profile desktop (desktop icons are disabled on the corporate setup). The profile is stored on the LAN and is filling her profile space up - but I suspect this is also the cause of the epic slowness.
    Any ideas on how I can stop RH mysteriously mirroring from C: to the user's profile?

    Thanks... I'm now onsite in Spain (tough life eh) and I still can't fathom what the issue is other than RH just doesn't like our network!
    We created a new empty project and that works fine, connects to source control and works in RH8 as expected.
    But the original project will not load up just just freezes for hours and never unfreezes! The size of that project is only around 30MB so the network traffic shouldn't be heavy..
    Not sure about the issue of files from c: getting mirrored to her desktop, I can't reproduce it, so not going to worry about that for now!
    If anyone has any ideas on why this project would fail to load in RH8, please shout!
    Otherwise we are going to have to rebuild on the new project

  • Change partition and directory path where iTunes stores music files

    Hi
    My system partition is full, but I have 90 GB freespace on a 2nd internal HDD. I would like move my entire iTunes music library to the 2nd HDD. How do I do that? How do I configure iTunes to look there for the library and to save new music to that new path in the future?

    There is an Apple article on moving your iTunes Music folder here:
    http://docs.info.apple.com/article.html?artnum=301748

  • How to read/write text file to db2 by using java code

    Hai
    I created the table to insert a clob data as follows
    db2 => create table ctest(datas clob(65536))
    DB20000I The SQL command completed successfully.
    db2 => describe table ctest
    Column Type Type
    name schema name Length Scale Nulls
    DATAS SYSIBM CLOB 65536 0 Yes
    1 record(s) selected.
    I tried the following java code to insert a clob data.
    public static synchronized Connection getConnection() throws Exception {
    Connection m_connectionDatabase = null;
    try {
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
    // Get the connection to the database.
    m_connectionDatabase = DriverManager.getConnection(
    "jdbc b2 ps","","");
    }catch (Exception e) {
    throw new Exception("Failed to connect to the database. ", e);
    return m_connectionDatabase;
    public static void main(String a[]) {
    File file = new File("d:\\a.txt");
    InputStream fis = new FileInputStream(file);
    Connection con = getConnection();
    PreparedStatement pstmt = con.prepareStatement("insert into ctest values(?)");
    //try 1
    pstmt.setAsciiStream(1,fis,(int)file.length());
    // try 2
    pstmt.setCharacterStream(1,fis,(int)(file.length()));
    // try 3
    pstmt.setBinaryStream(1,fis,(int)(file.length()));
    // try 4
    byte[] b = new byte[fis.available()];
    fis.read(b);
    pstmt.setBytes(1, b);
    // try 5
    byte[] b = new byte[fis.available()];
    fis.read(b);
    pstmt.setString(1, new String(b));
    pstmt.executeUpdate();
    pstmt.close();
    fis.close();
    Result:
    If the file size is less than 32kb, it inserted successfully.
    but if more than 32kb, it throws follwing exception
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0352N An unsupported SQLTYPE was encountered in position "1" of the input list (SQLDA). SQLSTATE=56084
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown Source)
    at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.loadParameters(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(Unknown Source)
    at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(Unknown Source)
    Can any body please help out to insert clob value.
    Thanks in advance
    V.Shan

    Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
    Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
    http://www.devshed.com/
    http://www.javaranch.com/
    If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
    -- foofoo (shamelessly stolen the text from jverd).

Maybe you are looking for

  • Looking for Answers

    Hi Guys,                I have the following doubts....... 1.Calender is Client Independent.What is the meaning of that? 2.After doing the Consignment Issue,Pick up,Return plant stock is not changing....What configuration i should do in IMG? 3.Paymen

  • How to separate the Particular field in next line ?

    Hi, i have multipule fields in one line but i want to separate the Particular field in next line how to do this ? when i am downloading  my output downloaded like this but i want to last field should be newline. present output: 901  ab  3455  5667 21

  • Prevent Instance Shutdown When Control File Can't Be Written To

    Our instance keeps shutting down when the system's backup utility backs up the control file (and once an index file) and locks the file. This also occurs when virus scanning. I was wondering if there was a parameter to set to have DB Writer try more

  • How do I download my Nikons pictures into Elements?

    How do I download my Nikons pictures into Elements?

  • How does FileVault 2 work for external hard disk?

    Hello users, I've activeted FileVault 2 for my computer and it works without slowing down! But now, I really want to try the new feature about FireVault 2, how can I use it for an external hd? I tryed to search from Google more information, without s