TEXT_IO.FOPEN how to pick file without specifying the full directory path

Hi,
I am using Oracle application server 10gR2 on Linux with forms 10g application. I am building the DEV/TEST/UAT environment on same Linux machine with one OAS.
I am using TEXT_IO.FOPEN ('/home/oracle/check.txt','r') to read a server side file and it is working fine.
Now I want to pick this file dynamically i.e. without specifying the full path. I am using TEXT_IO.FOPEN ('check.txt','r') and I copied file in forms_path directory in linux and even in $path directory in linux but none of them are working.
Pls help me sort out this problem.
Thanks in advance

Hi,
I have to read files in my app directory using TEXT_IO how is that possible?? I cannot set workingDirectory as my Oracle home is in a different location and as has been mentioned by others when I run the form on web it cannot seem to find the file in the default forms directory where all the .fmx file
Is there any other file setting that needs to be done??
Please help
Thanks & Regards
Mangesh Deshpande

Similar Messages

  • How can i run external application without specifying the full path?

    for example, ms word executable file is winword.exe, but in java i am using the following command:
    Runtime.getRuntime().exec("\"C:\\Program Files\\Microsoft Office\\Office10\\winword.exe\");
    the thing is, i dont know where ms word is installed on every machine, so rather than making an assumption, do you know how i can run ms word without specifying the full path?
    thanks

    1) You could ask the user to tell you where it's at (and remember for next time)
    2) You could do a file search for it (and remember it for next time)

  • How to call or open without specifying the full path?

    hi all,
    how to call or open without specifying the full path?
    for example the following code of a when_button_pressed trigger.
    call_form('c:\test\student.fmx',hide,do_replace);
    open_form('c:\test\student.fmx');
    i want to specify only the form name.
    call_form('student.fmx');
    open_form('student.fmx');
    i m using developer 2000.
    regard
    Muhammad Nadeem
    [email protected]

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\FORMS60_PATH=c:\test\;c:\orant\bin;...

  • Specify the full package path

    Well, here is a real beginner question. How can i specify the full package path of SUNs java.io package? And another beginner question, where is this package located on my computer? (relative to my java sdk installion path of course)

    Acctually I have a severe problem with leJOS. Here is my code:
    import java.io.*;
    import josx.rcxcomm.RCXBean;
    public class PCModule
         public static void main( String[] args )
              recv();
         public static void recv()
              RCXBean rcxb = new RCXBean();
              try
                   rcxb.setComPort("USB");
                   while(true)
                        System.out.println( "Test" );
              catch( IOException e )
    }This should compile fine, if lejosc would use the SUN java.io But it intends to use the own implementation of java.io and I really need to find a workaround to this problem because otherwise the code wont compile throwing the error, that the out symbol cannot be resolved.
    Btw. this part of the program should listen to the mindstorms IR-Tower for messages of a RCX-Brig and wirte them to an output stream.
    Isn't there a way to force lejosc to use the java.io package from sun?
    P.S.: If I don't use the System.out-line everything is fine, so lejos is installed correctly and if write a java test app everything is fine, so the SUN Java SDK is installed correctly too.

  • Loading a class via reflection without knowing the full qualified path ?

    Hi there
    I d like to load a class via reflection and call the constructor of the class object. My problem is that I dont know the full qulified name e.g. org.xyz.Classname bur only the Classname.
    I tried different things but none seem to work:
         1. Class c = Class.forName("Classname");  //does not suffice, full qualified name required
    2. ClassLoader classloader = java.lang.ClassLoader.getSystemClassLoader();
             try {
               Class cl = classloader.loadClass(stripFileType(Filename));//if i do not pass the full qualified name i get a ClassNotFoundException
    3. I tried to consruct a class object with my own classloader , calling:
              Class cl = super.defineClass(null, b, 0, b.length );     b is of type byte[]This almost works. I get a class Object without knowing the full qulified path. I can transform a filename into a raw array of bytes and I get the class out of it. But there is still a problem: If there are more than on classes defined in the same textfile I get an InvocationTargetException.
    It looks like this:
    package org.eml.adaptiveUI.demo;
    import com.borland.jbcl.layout.*;
    import java.awt.*;
    import org.eml.adaptiveUI.layout.*;
    import javax.swing.*;
    import java.awt.event.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class twoButtons extends JFrame {
      SPanel sPanel1 = new SPanel();
      JButton jButton1 = new JButton();
      GridBagLayout gridBagLayout1 = new GridBagLayout();
      GridBagLayout gridBagLayout2 = new GridBagLayout();
      public twoButtons() throws HeadlessException {
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      public static void main(String args[]){
        twoButtons twob = new twoButtons();
        twob.pack();
        twob.show();
      private void jbInit() throws Exception {
        this.getContentPane().setLayout(gridBagLayout1);
        jButton1.setText("button 1");
        jButton1.addActionListener(new TransformationDemo_jButton1_actionAdapter(this));
        this.getContentPane().add(sPanel1,  new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0
                ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(57, 52, 94, 108), 35, 44));
        sPanel1.add(jButton1,  new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
                ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 41, 0, 0), 0, 0));
      void jButton1_actionPerformed(ActionEvent e) {
        System.out.println("button 1 source: " + e.getSource());
        System.out.println("d: " + e.getID());
       System.out.println("/n commmand: " + e.getActionCommand());
    class TransformationDemo_jButton1_actionAdapter implements java.awt.event.ActionListener {
      twoButtons adaptee;
      TransformationDemo_jButton1_actionAdapter(twoButtons adaptee) {
        this.adaptee = adaptee;
      public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }As you can see there is the class TransformationDemo_jButton1_actionAdapter class defined in the same classfile. The problem is now that the twoButtons constructor calls the TransfomationDemo_jButton1_actionAdapter constructor and this leads to InvocationTargetException. I dont know if this is a java bug because it should be possible.
    Can you help me?

    hi thanks at first,
    the thing you mentioned could be a problem, but I dont think it is.
    If I have the full qualified name (which I havent) then everything goes normal. I only have to load the "twoButtons" class and not the other (actionadapter class), so I dont think this is the point. In this case the twoButtons constructor constructs an object of the actionadapter class and everything goes well. The bad thing is though that I do not have the full qulified name :(
    Invocation target exception tells me (in own words): Tried to acces the constructor of the actionadapter class (which is not public) out of class reflectionTest class .
    reflectionTest is the class where the reflection stuff happens and the twoButttons class is defineClass() ed.
    The problem is, only twoButtons class has the rights to call methods from the actionadapter class, the reflection class does not. BUT: I do not call the actionadapter methods from the reflection class. I call them only from the twoButtons class.
    I hope somebody understands my problem :)

  • Reading text files without specifying the encoding?

    I have looked everywhere for a solution, but I can't find one. The problem is that I'm using codes that everybody is using, but for some reason, my codes aren't working.
    I want to be able to open up text files in Java without having to specify the encoding for the files that I'm going read, because I have no idea which encoding they will use.
    But even when specifying UTF-8 to be encoding of the file to read, it doesn't work correctly:
    FileInputStream fileIS= new FileInputStream("somefile.txt");
    Reader reader = new BufferedReader(new InputStreamReader(fileIS, Charset.forName("UTF-8")));
    EVERYWHERE I look, ppl are using these codes! But it doesn't work, some characters (such as the Euro sign) are displayed as squares.
    However, I want to be able to read not only UTF-8 files but anything that Java supports. Any ideas?
    Edited by: Stalfos on Oct 22, 2007 12:22 PM

    Stalfos wrote:
    I want to be able to open up text files in Java without having to specify the encoding for the files that I'm going read, because I have no idea which encoding they will use.
    This is your problem. If you don't know what encoding the text is stored in, then the chances that the default encoding used to read it will be correct are slim.
    But even when specifying UTF-8 to be encoding of the file to read, it doesn't work correctly:There are many different character encodings, and most of them don't overlap. Anything above 127 usually causes problems.
    FileInputStream fileIS= new FileInputStream("somefile.txt");
    Reader reader = new BufferedReader(new InputStreamReader(fileIS, Charset.forName("UTF-8")));
    EVERYWHERE I look, ppl are using these codes! But it doesn't work, some characters (such as the Euro sign) are displayed as squares.The problem isn't with the code, it's that the file you're reading isn't using an encoding that's compatible with UTF-8. Assuming that using UTF-8 should work for all encodings is like assuming that someone who can read Chinese should be able to read a book written in Spanish or Greek. It doesn't work that way.
    However, I want to be able to read not only UTF-8 files but anything that Java supports. Any ideas?You need to know what encoding your files are stored in, period. There are a few ways to guess what the encoding is, but they're only reliable for a small set of encodings.
    You don't seem to truly understand what character encodings are, or how to use them, so read this:
    The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
    http://www.joelonsoftware.com/articles/Unicode.html

  • How can I start an executable without specifying the directory?

    I have downloaded the tor browser bundle and I would like to be able to start it with a command like "torbrowser" and not by specifying the full directory?

    I don't think it is a good idea to put it in /usr/bin at all but if you must, isn't it safer to move it there, as Trilby suggested? And change the permissions appropriately? That doesn't strike me as especially wise but it seems better than symlinking to an executable in your home directory from /usr/bin.
    One way to mitigate security threats is to limit the PATH root uses. So for an ordinary user, you might include /usr/local/bin or ~/bin. But for root, you wouldn't include these. This makes it a little bit harder to run something malicious as root inadvertently. If you start symlinking to executables in your home directory from /usr/bin, you defeat this. For example, I use this PATH for root:
    /usr/bin:/usr/sbin:/bin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl
    So root can't even run stuff under /usr/local on my machine without explicitly giving the path. But if I symlinked from /usr/bin to stuff under ~/, there would be no point in the restriction.
    EDIT: but I just realised sudo can... damn!
    Last edited by cfr (2012-06-24 00:39:59)

  • How to read file WITHOUT full path using TEXT_IO?

    We have a scenario like this:
    -- We have a Telco application.
    -- That has 3 types of installations. English and Spanish
    -- We have 2 App Servers (Eng & Spa) for the 2 installation types.
    -- But there is only ONE DB. I.e. users logging into Eng or Spa AS versions login to the same DB.
    -- We have to maintain 2 login forms because of Eng and Spa, because the menu labels have to come in 2 langs.
    -- I am trying to have one tree menu for this.
    -- To do this I did this.
    -- Put a text file in the Forms directory of the AS.
    -- The file has just one line. ENGLISH or SPANISH.
    -- I read this file and find out the language and then show labels according the language.
    Problem is that when I used TEXT_IO and gave file name like this filename:=GET_FILE_NAME('Avabill_AS_Language.txt', File_Filter=>'Text Files (*.txt)|*.txt|');
    I get a error saying file not found.
    I found out that with TEXT_IO you need FULL PATH of the file. Thing is path of the installation depends of installation to installation. I cannot create a parameter in the DB since the DB is COMMON. I HAVE TO use a text file in the AS directory.
    Is there any other way like reading the Default.env file or FormsWeb.cfg? Is there a parameter in any of these files which specifies the forms directory absolute path. I studied both file but could not find an entry.
    Any workaround would be greatly appreciated.

    Thanks BaiG for the quick response.
    U r right about that GET_FILE_NAME.
    I removed that and put the file name only and tried. Still get the same error.
    FUNCTION Avabill_Deployment_Type RETURN VARCHAR2 IS
    v_language VARCHAR2(100);
    in_file Text_IO.File_Type;
    BEGIN
    in_file := Text_IO.Fopen( *'Avabill_AS_Language.txt'* , 'r');
    Text_IO.Get_Line(in_file, v_language );
    Text_IO.Fclose(in_file);
    RETURN v_language;
    EXCEPTION
    WHEN OTHERS THEN
    Text_IO.Fclose(in_file);
    ALERT_MESSAGE(1,'FILE NOT FOUND: ' || SQLERRM);
    RETURN 'Normal';
    END;
    I get this error:
    *302000: non-ORACLE exception*
    As for you query:
    -- We have 2 app servers. One English and One Spanish.
    -- So we have 2 sets of forms. One English with English labels in the forms and the other with Spanish Labels.
    -- So we HAVE to have 2 menu forms as well, don't we? When the menu form is run how does it know whether the app server is English or Spanish.
    -- There is no way to find out. We cannot use a DB variable since BOTH use the same DB (at the same time). Eng users will enter in English while Spanish users will enter in Spanish.
    I don't see how we can have one menu form for this purpose. Can u elaborate your method further please?

  • What is directory where I can put in jar file without specify classpath ?

    hi,
    Is there any directory in weblogic similar to the directory of WEB-INF/lib/ where I can throw a jar file in without specify classpath explicitly.
    The reason I'm looking for such directory is :
    -- I do not want to specify classpath explicitly
    -- I'd like it outside of an application so that it stay even if the application redeployed.
    Thanks

    Hi Aacc,
    The domain library directory that you are looking for is usually $DOMAIN_DIR/lib, for example "C:\Oracle\WLS_Middleware10.3.4\user_projects\domains\test_domain_1\lib" (Windows) or "/u01/weblogic/domains/my_domain/lib" (Linux/Unix).
    The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath.
    You can override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.
    -Cris

  • How to export the text edit data to excel file without splitting the data in excel file?

    how to export the text edit data to excel file without splitting the data in excel file?
    I have a requirement in SAP HR where in the appraiser can add comments in the area given and can export that to excel file. Currently the file is getting exported but the comments getting split into deifferent rows.
    I want the entire comment to be fit in one row.
    Please help.
    Thank you

    Hi,
    if your text edit value is stored in 'lv_string' variable.
    then before exporting the value to excel you have to remove CL_ABAP_CHAR_UTILITIES=>NEWLINE
    that is '#' from the variable lv_string.
    for that use code some thing like this.
    REPLACE ALL OCCURRENCES OF CL_ABAP_CHAR_UTILITIES=>NEWLINE in lv_string WITH space.
    I think this will do the trick.

  • I've downloaded the wrong version as I thought I had a previous subscribed product. How do I change it to the full product without paying twice?

    I've downloaded the upgrade instead of the full version of Acrobat XI Pro. i thought my previous version just needed to be upgraded but it obviously doesn't have a serial number. How can I download an upgraded version without paying the full price as I've already paid for the upgrade?

    Your explanation is a bit confusing.  If you purchased an upgrade then you need to have purchased a previous version from which you are upgrading.  If you purchased an upgrade without having a previous version then you need to return/cancel that order and purchase the full version at the full version price.
    In terms of the software itself, the full version and the upgrade version are the same file.  The serial number you acquire from your purchase dictates whether a version is processed as a full version or an upgrade version.

  • Duplicates of a song on iPhone 4s but not in iTunes. Unable to delete duplicate. Won't play and won't let you swipe to delete. Any ideas on how to do so without resetting the phone?

    I have duplicates of a song on an album. One of the duplicates is grey with no album cover. When you attempt to swite and delete, the track will not delete and will not even play. I've contacted iTunes store and the person I received the support email from told me that it may not be downloaded. I emailed him back and explained that no there is no download for that song in my itunes store on my phone.
    One I never received an answer back which shows you how well these people do their job.
    Two: I really would prefer to have a solution to this problem without having to delete all of my music from my phone or resetting my phone. Because this duplicate isn't even showing up in my iTunes, it's only showing up on my phone.
    When I attempt to find it in my itunes it plays fine. But when I try to find the file to delete it, it is no where to be found. I've tried everything that I could think of to get rid of it. And I don't want to leave the album/artist off my phone because I do enjoy their music... And I have the microsoft sync in my car.
    Anyone got any ideas on how to do this without resetting the phone and/or taking my music off?

    If you have all your music on the cmputer then i would connect up my phone uncheck the Sync Music option and apply.
    This should take all the music off your phone .Then you can resync the music back on to it.
    If this doesn't work maybe a restore to factory settings and start from scratch is the way to go

  • Is there any way to create 3D PDF file without having the model tree ?

    Is there any way to create 3D PDF file without having the model tree ?
    3D communication is good but sometime we don't want the receiver to be able to study every components in model.
    or any way to make the receiver cannot use model tree and measurement tool ????
    Thank you very much

    You can remove the assembly tree by doing a roundtrip in 3D Toolkit, here's how:
    - start Acrobat 3D
    - drag & drop a CAD file
    - click on 3D Annot to activate
    - right-click on 3D
    - select 'Edit in 3D Toolkit'
    - 3D Toolkit launches
    - click in 'Scene Tree' panel
    - right-click on top assembly name
    - select 'Tools->Collapse Hierarchy'
    - select 'File->Save'
    - select 'File->Exit'

  • I am attempting to upgrade from Adobe Premier Elements 9 to Adobe Premier Elements 13 after using 13's trial version for a few weeks.  I am unable to find where and how to do this without losing the project I have been working on.  Please help?

    I am attempting to upgrade from Adobe Premier Elements 9 to Adobe Premier Elements 13 after using 13's trial version for a few weeks.  I am unable to find where and how to do this without losing the project I have been working on.  Please help?

    Vere Clarke
    Premiere Elements 9.0/9.0.1 and Premiere Elements 13 are standalone products.
    So, you can have both on the same computer, but only open one for your work.
    The classical recommendation is to finish a project in the version in which it was created since there
    is no guarantee that a project from an earlier version will open in the later version. Probably will, but
    no guarantees. And, when you do explore this, do it from a copy of the earlier version project. Once you
    take the earlier version project into a later version one, you cannot go back to edit the later version edited
    project in the earlier version program.
    If you have both versions (9 and 13) on the same computer and you have not moved, deleted, renamed any of the version 9's files/folders,
    right click the saved closed Premiere Elements 9.0/9.0.1 project file, select Open With, and then Adobe Premiere Elements 13.
    (Your 9.0/9.0.1 saved closed project file should be found in Libraries/Documents/Adobe/Premiere Elements/9.0.)
    Please review and consider. If any questions or need clarification, please do not hesitate to let me know.
    Thank you.
    ATR

  • Opening a file without hearing the previous one....

    How do we do to open a file without hearing the previous one if we open multiples files in a short time without willing to close the previous one each time ??

    How do we do to open a file without hearing the previous one if we open multiples files in a short time without willing to close the previous one each time ??
    If you don't wish to listen to all playing videos and it is too much trouble to stop or close non-foremost player windows, then don't use the QT X (or any similar) media player for playback. (I.e., this is what they are programmed to do.) Instead, use a media player like QT 7 which has a user preference that can be set so that only the "foremost" player window audio is heard when multiple videos are being played simultaneously.

Maybe you are looking for

  • G/L Account Display with Vendor Number and Name -Urgent-

    Hi Experts! Is there a transaction, report, or table that can show a list of all the vendor names/numbers for transactions posted to a specific G/L account for a specified period?  If so, please let me know.  Thank you for your time! Best Regards, WC

  • Firefox wont load pages

    Firefox won't load any pages. It just does nothing! I used to use it a lot until this happened a while back. I have reloaded it. I have started in Safe mode. If I run the mouse over buttons, they change shade, and some work. But if I want to look at

  • Same file - changed security settings

    I have created a pdf from word2010. If I view security settings in Reader 9 it says Commenting: Not allowed. If I open the same file on another machine but using Reader X (v 10.1.2) is it says Commenting: Allowed. Any ideas why?

  • Column total_retail bad value

    Hi All, I have a problem with the values on columns TOTAL_RETAIL and UNITS from table IF_TRAN_DATA. When I consult using PL/SQL or SqlDeveloper, this is the results: select total_retail, units from rms12.if_tran_data where rownum <= 5; -0,0101     10

  • Premiere Pro CS5 crashing when exporting (only certain file types)

    Hi I have found that when I try and export media in Premiere Pro CS5, it often crashes during the export. It says It's only certain file types. For instance, Vimeo HD seems okay but Vimeo SD always crashes mid-export. MPEG is okay too, but MPEG2-DVD