How to conifg jdeveloper10g to include properties files?

hello
in my project,i have a "param.properties" file,that contain the configuration info,i want to read it from my program.
i put it under the "src" directory in my jdeveloper10g project,and hope it can be included in the "class" directory after compilation and package.unfortunately it CANN'T.
i remember that jbuilder can be configed to include any kind of resource,but i don't know how can i config the jdeveloper10g to include the properties in the classpath?
thank you!

You can get JDev to "compile" (it doesn't really compile the properties file), and put it into your classes directory by adding it into the src directory and getting JDev to open it inside your project. Just make sure to put that properties file into the correct package for your code to reference it in the src directory (meaning just put it in the correct package folder in 'src').

Similar Messages

  • EJB project IDE build dos not include properties files

    We have property files also which we want included as part of the build process
    for EJB projects but if we use the IDE build it does not include them. We have
    to therefore export the IDE build and customize it to include *.properties like
    this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"> <!-- JARs
    filenames are encoded UTF8 --> <zipfileset dir="${project.local.directory}" includes="*.properties"
    /> </zip>
    which causes a problem for us because the exported build file is specific to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within an EJB project i.e.
    include properties files also.

    Hey Jamie,
    Currently there is no support to include other .properties files into
    the internal build. There's a build.properties that you get as part of
    an EJB project which you could place your values into and use that as
    your template for your team based development and check that into your
    source control.
    If you'd really like to get gross and hack Workshop a little bit you
    could modify the default EJB project template to use your .properties
    file for every EJB project you create. This would then splat a copy of
    your .properties file into the root of the EJB project.
    To do that you'd go to {your BEAHOME}\workshop\templates and crack open
    the ejb-project.zip template zip file and merge your settings into the
    existing build.properties file. This has the same
    effect as replacing the .properties file after you've created your
    project only it keeps you from having to perform that step each time.
    The downside of this is that each person on your team would then have to
    update that template zip file in their workshop installation. (I'd make
    sure to backup the original template file before performing this
    activity so you can always go back to the original template).
    Hope this helps,
    -Michael
    Jamie wrote:
    We have property files also which we want included as part of the build process
    for EJB projects but if we use the IDE build it does not include them. We have
    to therefore export the IDE build and customize it to include *.properties like
    this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"> <!-- JARs
    filenames are encoded UTF8 --> <zipfileset dir="${project.local.directory}" includes="*.properties"
    /> </zip>
    which causes a problem for us because the exported build file is specific to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within an EJB project i.e.
    include properties files also.

  • How to read JBoss server 'app.properties' file in the deployed Flex application?

    Hi, my current Flex project is using LCDS server to make call (Remote object call and Data managements services' call) to the backend Java services and consume data to render. I have defined the AMF and RTMP channels in the services-config.xml file and destinations for the Java services' in the remoting-config.xml and data-management-config.xml files.
         <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://localhost:8080/eqcFlex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>false</polling-enabled>
                </properties>
         </channel-definition>
    As of now both the Flex application WAR file and Java services EAR files are depolyed on the JBoss server on my machine, therefore I can hardcode the endpoint URL as http://localhost:8080 in the services-config file and hit the Java services.
    But the requirement is that the Flex application WAR file needs to be deployed on JBoss servers deployed on different machines and hence the endpoint URL cann't be hardcoded in the services-config.xml file. Is there a way we can pick up the endpoint URL from the JBoss server's app.properties file so that we can dynamically create channels in Actionscript code and make call to the backend services with dynamic endpoint URL?

    But in Command prompt I found out that My properties file by name
    'cedrelay.properties' is not recognised by web.xml.My web.xml structure is
    How does web.xml "recognize" anything?
    You specify the properties file as an init parameter. Do you read it in the init method of the servlet? If so, what does the code look like for reading the properties file?
    You'll have better luck if you put that properties file in WEB-INF/classes and load it as a resource input stream from the CLASSPATH.
    %

  • How can i read comments from properties file in the right order??

    Hello
    I want to build a console that read a properties file and print to the screen the property name, property value and property description and the developer can change the name or the value or the description of the property and update the property file.
    But the problem in using the properties class that it doesn�t read the comment and not save the properties in their order so I can�t couple description and name of the property.
    Does any one know any utility that do the job or know how to solve the reading the comments problem???
    Thank you a lot?

    sorry but i dont understand how the solution of using
    a dot ( property_key.description ) helping me to
    solve the problem?
    please try to explain it agin.
    thank youYou wrote:
    "I want to build a console that read a properties file and print to the screen the property name, property value and property description and the developer can change the name or the value or the description of the property and update the property file."
    So i'm as developer imagine that somebody edit properties in GUI or console. So you have 3 text fields: property name, property value, and propety description. Then developer save edit changes, then text fields maped to properties file and:
    text field "property name" and text field "property value" construct property:
    name=valuetext field "property name" adding ".description" and text field "property description" construct property:
    name.description=descriptionFor one described property, you will have put two properties.
    Thanks!

  • How to load some text from properties file ?

    Hi again,
    problem is i dont know how can i load a text from properties file like #{xxx['key']} in managed bean, i tried to find some solution but havent seen this kind of use this file in java code. Is it supposed to work only for labels in jspx pages ?
    thanks for help ...

    Hi,
    a managed bean is nothing special from any other Java file. However, if you look at SRDemo, you find a nice way of using the same message bundle that you use on the page
    See the messageFromBundle() method in the JSFUtils class of the UserInterface project
    Frank
    P.s. You can download and setup SRDemo from JDeveloper help--> check for updates

  • How big is too big for .properties file for a ResourceBundle?

    The subject says it all. We are using ResourceBundles to manage the dictionary of English/French literals for our web enabling project. Our .properties file is currently 675 key/value pairs. How big can .properties files grow before they are too big?
    Thanks,
    Don Booker - Programming Team Leader
    Common Departmental Financial System
    Public Works & Government Services Canada

    The resource gets loaded into memory, so there's a memory cost that increases with the number of properties. (There's also a time cost when it loads, but that's only once.) And finding one of the properties requires a search, so there's a processing cost involved. But it's based on a Hashtable, so it isn't a major cost even if the number of properties gets very large.
    So there's your constraints. The question is, though, what is your alternative when the resource does get too big? A database? That reduces the memory cost but increases the processing cost. I would guess you could let your properties file grow a lot before you were forced to go to a database, but actual testing would help.

  • How to give Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    You can use ResourceBundle class to load this properties file from the classpath:
    ResourceBundle props = null;
    props = ResourceBundle.getBundle("com.company.sql.SQL");

  • How to set Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    I am using the propeties file to get the SQL statements. I have all the SQL query statement in the properties file. I am creating a preparedstatement after getting the statement from the properties file with the id like we do in ResourceBundle. If I keep the properties file in the config directory of the Sun App Server instance , then it is working fine. But If I don't keep it there, then it is giving me a file not found exception.
    My SQL class which is accessing the properties file are in same package (com.company.sql). But still it is not able to find the file. As suggested by you, I tried it by giving the path as com.company.sql.SQL. Still it did not found the file. The file is there inside the WEB-INF/classess/com/company/sql/.
    Thanks
    Amit

  • How to call function in included dll file through java application.

    Hi All,
    i am trying to create an java application which call c# functions using JNI. i am completed with the code and it is running fine when i tried to run from netbeans IDE. But when i tried from Calculator.jar file, first time it throws this error:
    F:\JavaProjects\Calculator\dist>Java -jar Calculator.jar
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no CSharpClient in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at calculator.CalculatorApp.<clinit>(CalculatorApp.java:20)
    After that i included that dll file in the cuurent directory. And compiled and tried to run, it throws an unexpected error:
    F:\JavaProjects\Calculator\dist>Java -jar Calculator.jar
    *# An unexpected error has been detected by Java Runtime Environment:*
    *# Internal Error (0xe0434f4d), pid=2640, tid=3700*
    *# Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode, sharing)*
    *# Problematic frame:*
    *# C [kernel32.dll+0x12a5b]*
    *# An error report file with more information is saved as hs_err_pid2640.log*
    *# If you would like to submit a bug report, please visit:*
    *# http://java.sun.com/webapps/bugreport/crash.jsp*
    Anyone have idea how to solve this error.
    Thanks in advance.

    This error is created whenever things go sour on the native side. The first thing you can try, and I assume you are using a Java<->C++<->C# bridge which includes two dlls, one created by C++ and another by C#. Is to make sure that the C# dll is compiled using /t:module switch during compilation.
    If you are using VS2008, or VS2005, you can add a post build syntax like:
    csc /t:module /out:"$(ProjectDir)$(OutDir)YourModule.dll" "$(ProjectDir)YourCSfile.cs"
    Hope this helps! If not, ensure first that the native code works by creating a native test app for it.

  • How to configure boe.properties file in ACTool for SAP BO Distributed environment

    Hi ,
    I am trying to configure the ACTool for SAP BO distributed environment (dedicated BOE Server, Tomcat and Explorer) servers. I have installed SMD Agent, Host Agent and ACTool without any issues in the BOE server(CMS), but I am unable to run the ACTool in Tomcat Server(Web Tier)  and Explorer servers.
    1. How can we configure the boe.properties file for Tomcat Server and Explorer ser to run ACTool?
    2. Is it required to install SMD_Agent and Host_Agent  in Tomcat Server and Explorer server (in my case i have already installed).
    3. What all parameters need to be set in boe.properties file so that ACTool will run correctly in Tomcat server and Explorer server correctly.
    Regards
    Pramod

    Hi ,
    I am trying to configure the ACTool for SAP BO distributed environment (dedicated BOE Server, Tomcat and Explorer) servers. I have installed SMD Agent, Host Agent and ACTool without any issues in the BOE server(CMS), but I am unable to run the ACTool in Tomcat Server(Web Tier)  and Explorer servers.
    1. How can we configure the boe.properties file for Tomcat Server and Explorer ser to run ACTool?
    2. Is it required to install SMD_Agent and Host_Agent  in Tomcat Server and Explorer server (in my case i have already installed).
    3. What all parameters need to be set in boe.properties file so that ACTool will run correctly in Tomcat server and Explorer server correctly.
    Regards
    Pramod

  • How do I load a properties file that is in the same package?

    I have the following package:
    com.company.ldap
    In the package I have:
    main.java
    settings.properties
    I want to load the values in the settings.properties file in code, such as:
    propertiesFile = "settings.properties";
            try {
                properties.load(new FileInputStream(new File(propertiesFile)));
            } catch (IOException e) {
                ... error logging logic ...
            }I keep returning "The system cannot find the file specified".
    How do I properly load a properties file in a class file within the same package?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Put the file in the classpath (such as in the parent directory of com/company/ldap). Then obtain an input stream to that file like this:
    InputStream stream = getClass().getResourceAsStream("/settings.properties");
    Then use that stream in the properties.load method. Remember to close the stream as well.

  • How can i locate the properties files within a ejb container?

    when i develop servlet+javabean structure application,in order to imploement decoupling,i
    would like to write the config information in the properties files(key-value pair),in
    servlet,i use "getResourceAsStream(String relativePath)" method to retrieve the
    configuration information from the properties files(i even write the SQL clause
    in the files),it alwsys works well.
    now,i want to implement such function within the ejb container,that is to read
    a properties file from session bean,but i don't know how can i locate the file
    within the ejb container by using relative path,i wonder if there is the same
    method within ejb container as "getResourceAsStream(.......)" method within servlet
    container?
    thanks for any helps!
    the code snippet is appreciated!

    In general, you should look at using environment entries (variables) in the
    deployment descriptors (both the war and EJB jar rather than properties
    files for configuring J2EE applications. The reasons for this are many:
    1. This is the official way to do it according to the spec. Properties
    files are the J2SE way of doing things
    2. As you note, that it's not obvious how you would (legally) read a
    properties file inside an EJB.
    3. It's consistent between the web and EJB part of your code
    4. the weblogic console and tools have good capabilities to edit these
    fields.
    Kent
    "zhebincong" <[email protected]> wrote in message
    news:[email protected]..
    >
    when i develop servlet+javabean structure application,in order toimploement decoupling,i
    would like to write the config information in the propertiesfiles(key-value pair),in
    servlet,i use "getResourceAsStream(String relativePath)" method toretrieve the
    configuration information from the properties files(i even write the SQLclause
    in the files),it alwsys works well.
    now,i want to implement such function within the ejb container,that is toread
    a properties file from session bean,but i don't know how can i locate thefile
    within the ejb container by using relative path,i wonder if there is thesame
    method within ejb container as "getResourceAsStream(.......)" methodwithin servlet
    container?
    thanks for any helps!
    the code snippet is appreciated!

  • How to read properties file?

    hi,all friends,can you tell me how to get information from the properties
              file such as weblogic.properties or
              user defined properties file? And where should I put the properties file?The
              location of properties file
              should not be pre-defined in the source code.I wanna get the location of
              properties file from weblogic.properties .
              Help me and thanks a lot..
              Tony tian
              

              Hi Tony,
              for example in your init() insert such codes:
              Properties props = new Properties();
              FileInputStream fin;
              try {
              fin = new FileInputStream("weblogic.properties");
              props.load(fin);
              fin.close( );
              catch (IOException e) {
              throw new ServletException("blabla:", e);
              and verify the key, say: weblogic.system.bindAddr, you will get a string (exist) or null (non existing). for example:
              String s = props.getProperty("weblogic.system.bindAddr");
              if (s != null) {...} // existed
              else {...} // not existed
              Joe
              "Tony Tian" <[email protected]> wrote:
              >hi,all friends,can you tell me how to get information from the properties
              >file such as weblogic.properties or
              >user defined properties file? And where should I put the properties file?The
              >location of properties file
              >should not be pre-defined in the source code.I wanna get the location of
              >properties file from weblogic.properties .
              >Help me and thanks a lot..
              >Tony tian
              >
              >
              

  • Visibilty of properties file.

    Hello ;-)
    I'm integrating part of my application written in pure Java with CEP's Bean. Are there any
    limitations for including properties file from project? I tried all combination of access connected
    with "project visibility" but it doesn't work.
    try {
    properties = new Properties();
    properties.load(new FileInputStream("NwbSVMQoSClassifier.properties"));
    properties.load(new FileInputStream("src/NwbSVMQoSClassifier.properties"));
    properties.load(new FileInputStream("procjet/src/NwbSVMQoSClassifier.properties"));
    ...etc.
    }Can I get explanation why? I'm forced to use real path
    "e:\project_path\src\NwbSVMQoSClassifier.properties"
    on application "published on server"...
    ps.
    - Got one bug in Exception, space is missing:
    "<2009-10-13 03:06:34 CEST> <Error> <CQLProcessor> <BEA-000000> <Unknown event type [TestQueryspecified in channel [testChannel]>"Two characters are missing there.. and sometimes server is not connecting right with eclipse later
    - Cleaning console in eclipse brakes output for next operation.. I'm forced to restart server.
    Bye.
    R.
    Edited by: zatzy on 2009-10-18 21:57

    zatzy wrote:
    >
    Anyway In moment where constructor of unknown type from external library is called You can see bug of console. Which seems to
    be conneced with GUI rather then communication. All invisible/missing informations are displayed for short time after restart of server.I'm sorry but I'm not sure I follow the steps you're taking to reach this problem. Can you give more details on how to reproduce this? Thanks!- Use helloWorld example
    - add to "project" jar library.. like JDBC driver or something
    - create JDBC object with call of constructor in final bean.
    When JDBC is not added to "Runtime" tab in plug-in editor of manifest, You can publish app ( why ? something is wrong with analyze of libraries ) and get Exception on output that JDBC class is "Not found". Next, please comment with JDBC constructor calll and press "Publish". Console is hanging ( hit on clear button gives the same result )I think what's happening here is that you're allowed to deploy the app because the problem doesn't occur until the Java VM tries to load the JDBC class, which isn't available because it's not packaged in your bundle JAR. There could potentially be some way to warn users if they have specified a library on the Runtime tab that isn't included in the bundle JAR on the Build tab, but it may be difficult to do this as this is all Eclipse's UI. We'll have to look into this.
    We'll also have to look into the console issue. I'm not sure what's going on there. There are however special requirements I think for loading JDBC drivers early in the server startup, so there may be some issue here that is specific to JDBC. I'm not very familiar with what they are though. Perhaps others who monitor this forum can chime in and say if using a JDBC library embedded in your bundle is a good idea or not. If we don't hear anything back, maybe you could post a separate JDBC-focused question with more information about your use case.

  • Workshop IDE Build does not include all files

    We have property files also which we want included as part of the build process
    but if we use the IDE build it does not include them. We have to therefore export
    the IDE build and customize it to include *.properties like this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"> <!-- JARs
    filenames are encoded UTF8 -->
    <zipfileset dir="${project.local.directory}" includes="*.properties" />
    </zip>
    which causes a problem for us because the exported build file is specific to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within a project i.e. include
    properties files also.
    Thanks
    Mindy

    Hi Mindy,
    Why not in EJB?
    Yes there is no argument as to why property files cannot be copied over from EJB
    project.
    The reason is that Workshop has not implemented the feature with EJBProject. We
    have that feature only for Java projects and not for EJB project.
    Thanks a lot,
    Vimala
    "Mindy" <[email protected]> wrote:
    >
    You are saying the same thing again. My question is why not for EJB projects?
    I know we can create the files in Java project and read them with specific
    java
    files to read them but WHY NOT IN EJB IS THE QUESTION?
    "Carl" <[email protected]> wrote:
    Feature of the EJB Project:)
    "Mindy" <[email protected]> wrote in message
    news:4034c351$[email protected]..
    We have these property files in the EJB project, not Java project.Why
    should they
    not be copied if they are part of the EJB project?
    "Carl" <[email protected]> wrote:
    The properties file do get copied over if they are part of Java project.
    Hence, we have created utility classes in Java project that read
    the
    property file.
    For other project types, like EJB the property files didn't get copied...
    "Mindy" <[email protected]> wrote in message
    news:4033b944$[email protected]..
    We have property files also which we want included as part of the
    build
    process
    but if we use the IDE build it does not include them. We have to
    therefore
    export
    the IDE build and customize it to include *.properties like this
    <zip basedir="${dest.path}" zipfile="${ejb.outputJar}" encoding="UTF8"><!-- JARs
    filenames are encoded UTF8 -->
    <zipfileset dir="${project.local.directory}"includes="*.properties" />
    </zip>
    which causes a problem for us because the exported build file is
    specific
    to a
    user's local PC and cannot be used in a team environment.
    How can we have the IDE build include all the files within a projecti.e.
    include
    properties files also.
    Thanks
    Mindy

Maybe you are looking for

  • How Do I Correct FF GUI From Not Opening After Computer Restart

    Every time I restart my Win8 and then FF, the FF GUI does not open (i.e. the browser window does not appear) although Task M shows FF as running. Only work around so far is to re-install FF (obviously using another browser to access the download inst

  • Error Mail Merge Aborted due to error in creating the Mail Merge DataSource

    Dear All, please help me with this problem (Oracle release 12.0.4.) 1. PROBLEM: When attempting to extract data, using Web ADI in HRMS, Word is selected as the viewer, but an Excel spreadsheet is generated rather than a MS Word document containing th

  • Flash Action Script Key Press Restrictions

    Hello, so I am making a Pacman game and am using the following script for the movement of my character. onClipEvent (enterFrame) {           speed = 10;           if (Key.isDown(Key.LEFT))                     this._x -= speed;                     _ro

  • SQL Loader command cannot be called from SQLDeveloper.

    I read that SQL*PLUS will not be supported on Oracle 12C. Will Oracle add the ability to call SQL*Loader from SQLDeveloper. I find the SQL*Loader utility to be very useful for Data Modeling and the importing of unusually formatted data into multiple

  • Where can I find the wsdl file ?

    Hi, i want to know the real path of the wsdl files. in other words, after putting the axis directiry in the JBoss server/all/deploy, the axis server generate a wsdl file from a wsdd file. where does it put the wsdl file. Please help. Thanks. Ahmed