Create a properties file

Hi
How do I create a properties file in my project using JDeveloper 9.0.3.
Right now, I'm creating the file through explorer and then adding it to the project, via the menu bar.
But there has to be a simpler way to do this.
Thanks,
Sergio Bastos

You can use File->Open... to create new files and add them to the project simultaneously. Just type in the filename of the file you want to create.
Brian
JDev Team

Similar Messages

  • How to save a properties object to a file / how to create a properties file

    hi,
    i am writing an application in which all the database and user information is stored in a properties object and is later retreived from it when a database connection or login etc is required.
    i wanna know how can i save this object / write it to a file i.e. how do i create a properties file.
    so that every time the application is run to create a new dbase etc the entire info regarding that will be stored in a new property file.

    Load:
    Properties p = new Properties();
    FileInputStream in = new FileInputStream("db.properties");
    p.load(p);
    String username = p.getProperty("username");
    String password = p.getProperty("password");
    // ...Save:
    String username = "user";
    String password = "pw";
    Properties p = new Properties();
    p.setProperty("username", username);
    p.setProperty("password", password);
    FileOutputStream out = new FileOutputStream("db.properties");
    p.store(out, null); // null or a String header as second argumentThe file will look something like
    username=user
    password=pw

  • How to create a properties file for DB connection (BPEL async processes)

    Hi,
    In BPEL asynchronouns Project, I am trying to create the Database connection. Instead of hardcoding the details, I want to put it in the properties file and then import the connection file in order to create a connection.
    I am very new to BPEL and need urgent help. Hoping for a quick reply..
    Thanks

    So, what would be the practical approach for implemeting this. When I use "Import Connections" option, in help I get this:
    "File Name:
    Click Browse to locate a file containing the connection descriptor(s) that you want to import. Select the file and click Open. Connection descriptors are saved to XML files. The recommended file extension is .xml. You can import connections from previous versions of JDeveloper by importing connections from IDEConnnections.properties in the earlier installation. You can import connections from other versions of JDeveloper by importing connections from IDEConnnections.xml. "
    Please suggest.

  • Using .properties file in web dynpro

    Hi,
    I am having a requirement. I have to create a .properties file and I have to use it in my web dynpro application. How can I do that? Any help...
    Thanks & Regards,
    Raj

    Hi,
    Go to the navigator view...select src\Components\<ComponentName> and create create a .properties file.
    You can read the  configuration file in your webdynpro app as follows
    IWDConfiguration configuration =
          WDConfiguration.getConfigurationByName(
            wdComponentAPI.getDeployableObjectPart(),
            "<<>>");
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/aa343e32ff1033e10000000a114084/frameset.htm
    Regards, Anilkumar
    Message was edited by:
            Anilkumar Vippagunta

  • Writing to properties files

    I read the earlier posts about this, but still have questions.
    We need to write to a properties file to store user settings. We want to create two properties files. The first will not be edited by users and will be included in the jar file. This file will reference a second file that will be changed by users and will be stored on their machines.
    Will this work? Where on the user's machine should we put the second file? Does it matter?

    this will work fine.
    user.home is a good place to put the file.

  • Updating properties file with values containing characters like slash (/)

    Hi,
    I am writing a java class that would create/update properties file. I am passing a string that contains colons. e.g. a path like
    http://xyz.com
    I am using the java.util.Properties.setProperty(String arg0, String arg1) method to set the key value and the java.util.Properties.store(OutputStream arg0, String arg1) to create/update the properties file.
    The resulting property file contains the value as http\://xyz.com
    A slash preappended to the colon.
    I do not want this slash to be preappended.
    How can I achieve that?

    If you don't want this escaping to happend, then you don't want to be using java.util.Properties. Those define the file format in a certain way that includes escaping those characters.
    If you don't want this, you'll have to write them using normal Writers (and read them using Readers) with your own parsing/storing logic added.

  • In a new Application, the ApplicationResources_en.properties file is not having the constraint messages created

    Hi Everyone:
              We are using JDev 11.1.2 and JHeadstart 11.1.2.  We have been having a multitude of problems when running applications through the migrator (and we have now been told by an Oracle consultant that the migrator is problematic), so we are trying to re-write things from scratch to bring them over from 11.1.1.4 to 11.1.2.
              I have been working on a simple application from scratch and discovered that the messages for constraints on the entities that I am using are not showing up in the ApplicationResources_en.properties.file.  We noticed a similar thing with converting an application using the migrator and that post is found here - java.lang.NullPointerException ADF_FACES-60097 message ***WITH SOLUTION*** -. 
              However, I didn't get a single reply to that thread. 
              I initially thought it was a migration issue, but this application is from scratch.  Whenever I tried to input an invalid value into a page column, the following exception would be received.
    "java.lang.NullPointerException  ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #"
               This Null Pointer turned out to be the missing message from the ApplicationResources_en.properties file.  In the new application I just wrote, I had to manually edit to add the following lines to the ApplicationResources_en.properties file and the application no longer gives me the error if I input an invalid value.
    VALIDATE_FEE_CATEGORY_3=Feecategory with this FeeCategory does not exist
    VALIDATE_ACADEMIC_TERM36=Academicterm with this EffectiveTermStart does not exist
    VALIDATE_ACADEMIC_TERM36_CASDEL=Cannot delete Academicterm while dependent Specialexchange exists
    VALIDATE_ACADEMIC_TERM37=Academicterm with this EffectiveTermEnd does not exist
    VALIDATE_ACADEMIC_TERM37_CASDEL=Cannot delete Academicterm while dependent Specialexchange exists
    VALIDATE_CURRENCY23=Currency with this Currency does not exist
    VALIDATE_CURRENCY23_CASDEL=Cannot delete Currency while dependent Specialexchange exists
    VALIDATE_FEE_CATEGORY_3=Feecategory with this FeeCategory does not exist
    VALIDATE_FEE_CATEGORY_3_CASDEL=Cannot delete Feecategory while dependent Specialexchange exists
    These constraints are found in the Entities .xml files  as shown below.  We are using a re-usable business components .jar file to import them in.
      <Key
        Name="UniqueFeeCategory"
        PrimaryKey="true">
        <DesignTime>
          <Attr Name="_DBObjectName" Value="UNIQUE_FEE_CATEGORY"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.FeeCategory"/>
          <Item Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.Currency"/>
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermEnd"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateAcademicTerm36">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_ACADTERM_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_ACADEMIC_TERM36"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermStart"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateAcademicTerm37">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_ACADTERM_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_ACADEMIC_TERM37"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermEnd"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateCurrency23">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_CURRENCY_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_CURRENCY23"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.Currency"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateFeeCategory3">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_FEECAT_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_FEE_CATEGORY_3"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.FeeCategory"/>
        </AttrArray>
        Is this a known bug (I have searched and havent found it) and is there anything that I can do about it without having to manually add the messages?
    Mary
    UofW

    Hi Everyone:
               I have done some further testing.  We are using a re-usable Business Components .jar file to access our entities.  We import the .jar file into the project and create the ViewObjects and ViewLinks from that .jar file.
                It APPEARS that a test case using the HRSchema and using the Entities & Associates generates the constraint error messages, but when I use the .jar file of re-usable business components imported into the project, those constraint error messages are not created in the ApplicationResources_en.properties file.  I have created two testcases as well as the re-usable .jar file that I can send to you to show what I mean. 
                This behaviour seems to have shown up in 11.1.2 as there was no problem before this.
                 Please let me know where you'd like me to upload the testcases.
                 Thank you.
    Mary
    UofW

  • Creating a PDF-file with CONVERT_OTF. How to set the properties?

    Gents, Ladies,
    I have an ABAP that uses CONVERT_OTF and creates a pdf-file. This works fine but now the security properties of the pdf-file need to be set to not-modifiable (See File, Document Security in Acrobat's Reader).
    Can any of you help me to set any of the properties of the pdf-file?
    Best regards,
    Tim van Steenbergen.

    Hi tim,
    sorry, it's not possible (see Steff's posting)
    http://www.abapforum.com/forum/viewtopic.php?t=318&highlight=pdf
    grx
    Andreas

  • How to create an Object array(two dimensional) from a properties file..

    Hi All..
    I have a typical problem..
    I have a properties file with key/value pairs . Now what I want to do is.. I need to read all the keys and the values corresponding to that keys and then create a two dimensional array.. Like..
    Properties props;
    Object[][] contents;
    My contents should be like
    contents = {{key1,value1},{key2,value2},{key3,value3},...};
    Can someone tell me how to do this.. asap...
    TIA
    CK

    Just because something is difficult for you does not qualify it as an "Advance Language Topic"... And it certainly doesn't allow you to multi-post.

  • Cannot find edqp.properties file, can I just create it manually?

    I would like to establish a connection between my EDQ and EDQP instances, both 11g versions. I understand OEDQ server must be configured first so the EDQP processor will appear in the EDQ Tool Palette section. EDQ Online Help says that the 'edqp.properties' file must be created in the [install path]/config/edqp directory. However I cannot find [install path]/config/edqp directory. Instead in My Oracle Support it says that 'In EDQ 11g, the edqp.properties file belongs in the "..oedq_local_home/edqp" folder. When I checked "..oedq_local_home", there is no 'edqp' there. Can I just create the 'edqp' folder inside the "..oedq_local_home" directory?  Then can I also just manually create the 'edqp.properties' file afterwards? When I am done creating them all manually, do I need to bounce my EDQ server to reflect these changes? Thanks in advance for any reply!

    Yes, just create the folder and file in the local home.

  • Translated properties file not created

    I am trying to translate an application to several languages.  I imported the translated xlf files into the project and reloaded/rebuilt.  Translated versions of the properties files were created for all the languages I tried except Chinese.
    Any ideas?

    I checked the log, but nothing stood out (no errors and nothing different from the reload/rebuilds without Chinese translations).
    I was able to get it to work using the language code "zh_CN", but the properties files were not generated when I used the language codes "zh" or "zh-CN".  I guess I was just trying to use unsupported language codes.
    Thanks for the help...

  • Creating menu from properties file

    hi,
    I want to create a menu dynamically using a properties file.
    All the nodes of the menu are inside the properties file.
    I have a main page, inside the main page i have include this menu.jsp file, this file must read the properties file and and consruct the menu. can any one suggest me a better way to do this.
    iam trying to do with a bean file. is there any better way please suggest.
    thanks
    vin

    I would split it into two parts. Use a JavaBean to load the menu structure from the proprties file (perhaps makes a TreeMap or similar structure of value/link pairs) then use a custom tag to generate the on-screen menu from the tree generated by the JavaBean (you pass the bean to the tag, it traverses the menu structure and outputs the HTML/CSS/javascript needed to make the display).
    Search the net. A similar library may already be available. If not, then you can search JavaScript libraries to get an idea on how to do the menu display part.

  • Error reading properties file upon deployment

    hi. i'm still relatively new with regards to the Java programming language. in any case... i am developing a simple project wherein the application has to make a database connection to a server. the application is finished already however.. i am having problems deploying it.
    my project has a "resources" package containing the file "config.properties" which contains various information (connection details among others). correct me if im doing something wrong, but in deploying in, i copied the "dist" folder of my compiled code and then tried to run the java exe independently which resulted in an error. i already tried copying the "config.properties" file to the dist folder and even creating a "resources\config.properties" file but it still results in an error. could you please help me figure out how to deploy the application with the properties file. the code i used in referencing my .properties file is as follows:
    Properties configFile = new Properties();
                configFile.load(this.getClass().getClassLoader().getResourceAsStream("Resources\\config.properties"));
                String username = configFile.getProperty("username");
                String password = configFile.getProperty("password");
                String url = configFile.getProperty("url");
                String dbtype = configFile.getProperty("dbtype");
                Class.forName(dbtype);
                conn = DriverManager.getConnection(url, username, password); thanks in advance. ^^

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Error reading Properties file

    I have a main method which i am using to call a servlet located in the same Development Component. Until recently i had the servlet location hard coded and it was working without issues. Now i decided to make the location configurable. For this i created an sap.application.global.properties file in the EAR DC which contains the WAR of this DC.
    The contents of the above file are as follows:
    SAP application properties
    SERVLET.LOCATION=http://<server-name>/ControllerServlet/servlet/com.nike.xapps.eqptsp.swem.controller.ControllerServlet
    The code i am using in the main method to call this properties file and access the property is as follows:
    Context ctx = new InitialContext();
    ApplicationConfigHandlerFactory cfgHdlr = (ApplicationConfigHandlerFactory)ctx.lookup("ApplicationConfiguration");          
    Properties props = cfgHdlr.getApplicationProperties();
    String servlet = props.getProperty("SERVLET.LOCATION");
    contained in a try...catch block.
    On dubugging i get a NoInitialContextException repeatedly in the statement where the lookup is performed.
    These are all the additions i have made for reading this properties file. Does anyone know if there is anything more that needs to be done for this to work.
    Thanks,
    Murtaza.

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Display data on ADF table using a VO binded to a message.properties file

    Hi,
    I want to display data in a JSPX page using ADF table which is based on a ViewObject. The attributes of the ViewObject should get it's value from a abc.properties file(static file).How can i achieve this.
    thanks in advance.
    regards,
    Himanshu.

    Hi Himanshu,
    When you create a VO based on static values, all of the records from your VO are generated into the MessageBundel.properties file like this
    devguide.entity.ViewObj.SL_0_0=1
    devguide.entity.ViewObj.SL_0_1=<val1>
    devguide.entity.ViewObj.SL_0_2=<val2>
    devguide.entity.ViewObj.SL_1_0=2
    devguide.entity.ViewObj.SL_1_1=<val1>
    devguide.entity.ViewObj.SL_1_2=<val2>
    You could add more lines to the properties files maintaining the same pattern. Also noticed that you can read all the values from a CSV file as well.
    The last resource is to programmatically read the file and start creating new rows on the VO, which won't use any of the declarative tools for VOs.
    -Juan Camilo.

Maybe you are looking for

  • Acrobat Pro collapse after trying to adjust my pdf form created in Indesign 6

    I want to change the font type in in pdf form which I created in Indesign, while attempting to do so, Acrobat Pro collapse and shut down....what's the problem? Regards, Marieke

  • Help,  I have a macbook pro and I need to re-load the OS,   But...

    I don't have any disks for it.  Its a 4 yr old laptop ('08 mbp, 2.4).  I put a new HD in (old one went bad) and I need to load the OS on it.  Problem is I have no disks to do so.   I have another mac.   Is there any way I can connect it to my other o

  • Macbook OS X 10.5.8 startup slow.

    Help appreciated! I was receiving notifications that my startup disk was full and would have to pause programs that I was using s/a safari etc in order to continue using my computer. At that point I was able to turn the computer on and off with no pr

  • Run-time Error '432'  in WAD

    Hi Experts, While opening a web template in web application designer, I am getting following error, Run-time Error '432' : File name or class name not found during automated operation. If i press ok, exist from WAD. I have uninstalled the GUI and ins

  • How to use resource of in Webcenter Space into one of its Child Spaces

    I have a requirement for using the Spaces resources(Navigation Model,Skin ) that are created at the Sub Space level to be used in the Child Sub Spaces. For eg., Consider the example where i have a sub Space "A". This space has the Resources like navi