How to use environment variables in extension.xml

Is it possible to use environment variable when specify classpath in extension.xml that is part of one JDev extension?

Hi Matias,
Sure, you can use substitute-variables command for this purpose.
See the example below:
concat [substitute-variables "${system_property:user.home}" | str] "/.m2/repository"]
Kind regards,
Ulyana.

Similar Messages

  • How to use Environment variables in Context Settings

    I need to set some Preferences using a Context, and in the value of the preference I need to use a path which may change depending on the OS.
    I need to use environment variables or java variables to create the relative path for the value.
    Is possible to access env variables from a Context Setting?
    Just to give an example, I'm trying to set the M2_REPO variable in the classpath settings in the preferences menu.
    to user.home + /.m2/repository
    How can I access the user.home from there?

    Hi Matias,
    Sure, you can use substitute-variables command for this purpose.
    See the example below:
    concat [substitute-variables "${system_property:user.home}" | str] "/.m2/repository"]
    Kind regards,
    Ulyana.

  • Adding environment variable in build.xml(ANT)

    Hi,
    I need some information Regarding ANT,
    the problem is i have to add a property file in build.xml (as a environment varialble) so that i can read it in my java code. as
    System.getProperty("").
    Please sugggest me how to set environment variable in build.xml(ANT)
    Thanks
    Edited by: fdfddf on Apr 7, 2008 3:20 PM

    Hi Jakain, yep thanks for your information but my manager wants that way to do..
    he wanted me to set property file as a environment file using build.xml as this property file changes dynamically..
    can you suggest me

  • How can I use environment variables in a controller?

    Hi all,
    How can I use environment variables in a controller?
    I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPLTMP.
    Is there a method somewhere that would resolve this??
    By the way,Did anyone used the class of "oracle.apps.fnd.cp.request.RemoteFile"?
    The following is the code.
    My EBS server is installed with 2 nodes(one for current,and other is for application and DB).I want to copy the current server's file to the application server's $APPLTMP directory. But the result of "mCtx.getEnvStore().getEnv("APPLTMP")" is current server's $APPLTMP directory.
    Can anyone help me on this?
    private String getURL()
    throws IOException
    File locC = null;
    File remC = new File(mPath);
    String lurl = null;
    CpUtil lUtil = new CpUtil();
    String exten;
    Connection lConn = mCtx.getJDBCConnection();
    ErrorStack lES = mCtx.getErrorStack();
    LogFile lLF = mCtx.getLogFile();
    String gwyuid = mCtx.getEnvStore().getEnv("GWYUID");
    String tmpDir = mCtx.getEnvStore().getEnv("APPLTMP");
    String twoTask = mCtx.getEnvStore().getEnv("TWO_TASK");
    // create temp file
    mLPath = lUtil.createTempFile("OF", exten, tmpDir);
    lUtil.logTempFile(mLPath, mLNode, mCtx);
    Thanks,
    binghao

    However within OAF on the application it doesn't.
    what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
    No, it is read from the adovars.env file only.Thanks
    Tapash

  • Using environment variable / double quotes in "Arguments" in "Server Start"

    I have an admin server, NodeManager, and 1 managed server, all on the same machine (windows). I am trying to enter something similar to this to the arguments field in the Server Start tab:
    -Dmy.property=%USERPROFILE%\someDir\someJar.jar
    But when the managed server is started it throws this exception:
    Error opening zip file or JAR manifest missing : %USERPROFILE%\someDir\someJar.jar
    It appears that the environment variable is not being translated into it's value. It is just passed on to the managed server as plain-text. I tried surrounding the path with double quotes (") but the console validates the input and does not allow this: *"Arguments may not contain '"'"*
    Even editing the config.xml file manually cannot work, as the admin server fails to startup after this:
    <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing failure in config.xml: java.lang
    .IllegalArgumentException: Arguments may not contain '"'.>
    I also tried using %20 to no avail, it is just passed as %20.
    I thought that perhaps this had something to do with the spaces in the value of %USERPROFILE% (which is "C:\documents and settings.."), but the same thing happens with other env. variables which point to other directories with no spaces.
    _My question:_
    Is there any supported way of :
    using double quotes? what if i have to reference a folder with spaces in it's name?
    reference an environment variable? What if i have to rely on it's value for distributed servers where i do not know in advance the variable's value?
    Edited by: 937622 on Sep 28, 2012 1:02 AM

    There is workaround : http://stackoverflow.com/questions/12629395/weblogic-using-environment-variable-double-quotes-in-arguments-in-server
    Just posting here for reference. Let's see if we get a different answer from anyone else.

  • Using environment variable in rule file

    Hi,
    I want to datacopy from one cube (scenario Forecast) to another (scenario FcstJan, FcstFeb, and so on) based on which month is running currently. I want to use environment variable in the rule file. The Forecast data will be extracted in .txt and will be imported to the second cube in FcstJan if current month is Jan and same for Feb, Mar..... The CurrentMth will be my env variable.
    Can anyone please let me know how I can use that variable in the rule file. Or, if there is any other way to load the same.
    Thanks.

    You could just set a substitution variable and then use the substitution variable in the header of the rule.
    Have a read of :- Re: Data error
    to understand about using substitution variables in the header of a rule file.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Use of variables in "FOR XML PATH"

    Other than using dynamic sql (which we don't want to use) is there a way to use a variable in For XML Path, e.g.
    select
    FOR XML PATH (@BookName), ROOT('Book'), TYPE
    TIA,
    edm2

    In terms of general XML design this is poor.  An element is normally a 'thing', and the attributes are normally the properties of that thing.  Therefore in your case you would have a Book property with a 'name' attribute.  It would be impossible
    to create an XSD for your xml, and makes it awkward for readers of your xml - how do they know the book name beforehand?  Creating this xml in the normal fashion would also make it easy to create without any messing around ( string manipulation,
    other hacks ), eg
    DECLARE @BookName NVARCHAR(20) = 'SomeBook'
    SELECT
    @BookName "@name"
    -- Other book attributes
    FOR XML PATH ('Book'), ROOT('Books'), TYPE
    So now you have a Book item(s) within a Books collection.  Easy!  : )

  • Using environment variables

    How can I use environment variables in a controller?
    I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPL_TOP or $XX_TOP
    Is there a method somewhere that would resolve this??

    However within OAF on the application it doesn't.
    what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
    No, it is read from the adovars.env file only.Thanks
    Tapash

  • How to set environment variables in WL ?

    Hi,
    How to set environment variables in WL ?
    Thanks,
    Srivi

    Hi,
    You can set the environmet variable in Weblogic by using the below commands
    setWLSEnv.cmd/sh ==>Set the CLASSPATH to include the WebLogic Server classes.
    Overview of WebLogic Server Domains
    or you can use to set the Environment variable along with domain specific varables using the SetDomainEnv.cmd
    To run SetDomainEnv.sh in Linux please use
    . ./setDomainEnv.sh it require two dots (Dont miss it )
    http://docs.oracle.com/cd/E28280_01/web.1111/e13749/weblogicserver.htm#ADMRF205
    Hope it helps

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • Using environment variable in local site folder filespec

    Configuration: Dreamweaver CC 2014.1; Windows 7
    I have quite a few sites defined in Dreamweaver and would like to define the folder locations using environment variables so thst if I decide to reorganize my disk (again) I can just redefine the variable instead of having to modify each of the site definitions. For example, instead of W:\dw\site\, I would like to specify %dw_root%\dw\site\ (where dw_root is defined as "W:"
    Attempting to save a configuration with this filespec fails with the error: The local site folder path must be absolute.
    I copied the path from the DW configuration dialog box and pasted it into a DOS window as the filespec of a DIR command to confirm the syntax was valid.
    Does anyone know if there is a way to make this work?
    Thanks.

    Very unlikely.  DW won't tolerate special characters (%&*~).
    Nancy O.

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use bind variables in the following query

    CREATE OR REPLACE PROCEDURE MMDB.test IS
    sel_qtn VARCHAR2 (10);
    CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
    AND run_id = 100
    a PT_QUANTITY%ROWTYPE;
    BEGIN
    FOR i IN PT_QUANTITY
    loop
    sel_qtn := i.quanttity-1;
    While sel_qtn>=1
    loop
    insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
    sel_qtn :=sel_qtn -1;
    End loop;
    commit;
    end;

    Don't duplicate threads: How to use bind variables in the following query

  • How to use Xerces to validate an XML file against a DTD

    Hi, can anybody tell me how to use Xerces to validate an XML file against a DTD. its urgent. post some sample code. it would be helpful for my project. isupposed to use SAX parser(Xerces)
    Thanx in advance

    Come on, I googled "xerces validate" and the first link is the Xerces FAQ:
    http://xerces.apache.org/xerces-j/faq-general.html
    And of course "how to validate" is a Xerces FAQ. Help yourself by doing a little research instead of waiting for other people.

  • How to use bind variables in this procedure

    Hi Experts,
    How to use bind variables in this procedure for static queries.
    PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
    IS
    BEGIN
    V_date DATE;
    SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
        DELETE FROM MER_CLEAR
        WHERE MER_DT < v_date
        AND ID = M_ID;
    COMMIT;
    END;   
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    Please help me.
    Thanks.

    976208 wrote:
    How to use  v_date and m_id as bind variables in this procedure to avoid hard parsing.
    You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
    Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
    Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
    Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
    One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool.

Maybe you are looking for