Howto resolve the path to the class file

hi @ all,
i'm currently developing a package for ldap operations. now i want to write down all the real basic configuration for that package into a xml file which i want to save in the folder where the compiled class files are stored. my problem is that i do not know how i can resolve the absolute path to that xml file later. i mean, how can i load this file if the package is, e.g. exported as an jar file and i do not know where this jar file will be stored by the users of my package.
can anyone help me with that please?
thx in advance
dialsc

k, cool...
looks like it goes into the right direction.
with this statement i get the path where the jar is stored, right.
in my current situation this is the path to the src directory which i configured my eclipse ide to store the class files under.
let's say this path is d:\tmp\src
my package is tdl.domain.utils.ldap
so in fact at the moment my class files are stored under d:\tmp\src\tdl\domain\utils\ldap and the xml file too.
first:
that statement returns /D:/tmp/src
as you can see it uses unix path separators. do i have to replace them with the machine specific pathSeparatorChar?
second:
can is simply add the path tdl\domain\utils\ldap to that one (using the according machine specific pathSeparatorChar) and will this also work when i build a jar file of my package?
sorry for all that questions but i realy need this...
thx
dialsc

Similar Messages

  • How to determine the path of the jar file cache of javawebstart?

    Hello, I need to know how to determine where the java web start application
    file jar cache is stored on windows system hard drive.
    I would have launch of the inner processes
    I have need to know the path of file jar .
    example if my application is myAppliation.jar
    in code generic class of myAppliation.jar i have the command runtime
    String strCmd =
    System.getProperties().getProperty("java.home") + "\\bin\\java" +
         " -cp " +
         System.getProperties().getProperty("java.class.path") + ";"
         + " anotherClass.class ";
    Runtime.getRuntime().exec(strCmd);
    the anotherClass.class has need
    of the contained library in myAppliation.jar.

    Thanks i have tried this metod and function
    java.net.URL resource = classLoader.getResource("myResource");
    if (resource != null) {
    String s = resource.toString();
    if (s.startsWith("jar:")) {
    int index = s.indexOf("!");
    if (index > 4) {
    String fileurl = s.substring(4, index);
    if (fileurl.startsWith("file:")) {
    String path = fileurl.substring(5);
    // now path is the path to the jar file in the cache containing the resource
    System.out.println("file jar: "+path);
    }

  • How dos the application will know the path of persistence.xml file

    Hi ,
    I am seeing examples for ConatierManaged EntityManager
    @PersistenceContext
    public class Test extends HttpServlet
    public void doGet()
    EntityManager em
    // JnDI Lookup code
    em = (EntityManager) ctx.lookup("java:comp/env/persistence/em");
    em.persist(Employee)
    }Inside web.xml file
    <web-app>
    <persistence-context-ref>
    <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
      <persistence-unit-name>my-pu</persistence-unit-name>
    </persistence-context-ref>
    </web-app>Please tell me how the Application will know the path of persistence.xml file .
    Thank you for reading

    it is predefined; JPA always looks for the persistence.xml file in the META-INF folder.

  • Displaying the path of the file selected by a FileChooser in a TextField

    I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
    final FileChooser fc1 = new FileChooser();
    final FileChooser fc2 = new FileChooser();
    final TextField tf1 = new TextField();
    final TextField tf2 = new TextField();
    private void button1ActionPerformed(ActionEvent evt)
                int returnVal1 = fc1.showOpenDialog(labelPhpFile);
                if (returnVal1 == JFileChooser.APPROVE_OPTION)
                    File file1 = fc1.getSelectedFile();
                    String fileName1 = file1.getName();               
                    String filePath1 = file1.getPath();
                    tf1.setText(filePath1);
    private void button2ActionPerformed(ActionEvent evt)
                int returnVal2 = fc2.showOpenDialog(labelPhpFile);
                if (returnVal2 == JFileChooser.APPROVE_OPTION)
                    File file2 = fc2.getSelectedFile();
                    String fileName2 = file2.getName();               
                    String filePath2 = file2.getPath();
                    tf2.setText(filePath2);
    }The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
    Thank you :)

    h1. The Ubiquitous Newbie Tips
    * DON'T SHOUT!!!
    * Homework dumps will be flamed mercilessly.
    * Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
    h5. Ask a good question
    * Don't forget to actually ask a question. No, The subject line doesn't count.
    * Ask once
        - Don't Crosspost!
        - Two people answering one question independantly is a waste of there time.
    * Don't even talk to me until you've:
        (a) [googled it|http://www.google.com.au/] and
        (b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
        (c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
        (d) referred to the JLS (for "advanced" questions).
    * [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
        - Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
          - FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
        - Often you discover your own mistake whilst forming a "Good question".
        - Many of the regulars on these forums will bend over backwards to help with a "Good question",
          especially to a nuggetty problem, because they're interested in the answer.
    * Improve your chances of getting laid tonight by writing an SSCCE
        - For you normal people, That's a: Short Self-Contained Compilable Example.
        - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
        - Often you discover your own mistake whilst writing an SSCCE.
        - Solving your own problem yields a sense of accomplishment ;-)
    h5. Formatting Matters
    * Post your code between a pair of &#123;code} tags
        - That is: &#123;code} ... your code goes here ... &#123;code}
        - This makes your code easier to read by preserving whitespace and highlighting java syntax.
        - Copy&paste your source code directly from your editor. The forum editor basically sucks.
        - The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
          - Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
          - Lines longer than 80 characters should be wrapped.
          - Proper indentation illustrates program logic.
    * Post your error messages between a pair of &#123;code} tags:
        - That is: &#123;code} ... errors here ... &#123;code}
        - To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
            System.out.println("Your momma!); // <<<< ERROR 1
        - Note that error messages are rendered basically useless if the code has been
          modified AT ALL since the error message was produced.
        - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
    * The forum editor has a "Preview" pane. Use it.
        - If you're new around here you'll probably find the "Rich Text" view is easier to use.
        - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
        - To see how a posted "special effect" is done, click reply then click the quote button.
    If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
    h1. The pledge!
    We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

  • Function Module to find the Path of the file in the Application Server

    Hi All,
            Any function module available to find the path of the file stored in the application server. Please let me know.
    Thanks.

    Check this code:
      DATA: dl_file TYPE ibipparms-path.    " File name
      CONSTANTS: c_dir       TYPE  rlgrap-filename.
    * F4 filename for Application server
        CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
          EXPORTING
            directory        = c_dir
            filemask         = ' '
          IMPORTING
            serverfile       = dl_file
          EXCEPTIONS
            canceled_by_user = 1
            OTHERS           = 2.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Error while getting the file name'(006).
          EXIT.
        ELSE.
          p_file =  dl_file.
        ENDIF.
    Thanks & Regards,
    Siri.
    Message was edited by:
            Srilatha T

  • At the time of generating .class files i got below warning.

    Hi all,
    i develop one oaf page and move to server and generate .class files.
    at the time of generate .class files i got below error.
    plz help me.
    *[appldev@wnsfinapp webui]$ javac AgingBucketsCO.java -deprecation*
    AgingBucketsCO.java:114: warning: setRedirectURL(java.lang.String) in oracle.apps.fnd.framework.webui.OAPageContext has been deprecated
    pageContext.setRedirectURL(
    *^*
    *1 warning*
    Thanks
    Seshu
    Edited by: its urgent on Jan 30, 2012 4:47 AM

    Hi Pratap,
    thanks for your replay,
    i register the page in apps its working fine.
    but my page having go button.normally whenever goto the GO button it display hyperlink.
    in my local machine displays hyperlink.after move to server it displays cursor.
    Plz help me
    Thanks
    Seshu.

  • How to get the Path of the Current File using Import & Export File -Reg.

    Dear all,
    I have a mega (big) doubt. I have manually inserted the Figures from the figure folders. Now i need, fully automated. So How can I get the Figure path
    Example :
    PMString path = "E://development/Figures/";
    now i checked, How many subFolders is there in "path", get the All Subfolders and check to the Article Name.
    Example
    Article Name == subFolder name then get the Files from the SubFolders(E://development/Figures/ChapterF/*.eps files").
    now I paste the Document using to For Loop.
    Please any one can suggest me, How can We get the Path in SDK.
    Note:
    Should I have to create the relative path by myself?
    No method supplied in SDK to do this directly?
    Please I need a help of this Query as soon as posible.
    Thanks & Regards
    T.R.Harihara SudhaN

    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp?frame=true
    When a file is uploaded, the file name is also submitted. The path of the file is available only to the machine within the Local Machine security zone. The value property returns only the file name to machines outside the Local Machine security zone. See About URL Security Zones for more information on security zones.
    i need to know on how to get the compelete path /directory of the filename
    using <input type="file"> tag You can't. Its a security thing.
    is there any other way to get an input file from a local host aside from <input type="file"> tag?No. Not using just html.
    You could always go into activex components, but thats different again.
    Cheers,
    evnafets

  • How to get the path of input type="file" tag

    -- im using <input type="file"> tag to get an input file from a local host, it returns only the filename but not the complete path of the filename,,,
    -- i need to know on how to get the compelete path /directory of the filename using <input type="file"> tag , or is there any other way to get an input file from a local host aside from <input type="file"> tag?
    thanks

    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp?frame=true
    When a file is uploaded, the file name is also submitted. The path of the file is available only to the machine within the Local Machine security zone. The value property returns only the file name to machines outside the Local Machine security zone. See About URL Security Zones for more information on security zones.
    i need to know on how to get the compelete path /directory of the filename
    using <input type="file"> tag You can't. Its a security thing.
    is there any other way to get an input file from a local host aside from <input type="file"> tag?No. Not using just html.
    You could always go into activex components, but thats different again.
    Cheers,
    evnafets

  • How to find the path of the file at enduser system

    Hi  Frndz..
    Am per my requirement i need to read XL file from enduser PC, for this i need to kno the path on the enduser PC i.e . ,lets assume that test.xsl file is there an enduser PC on his desktop , so i need the path where its like  "C:\Docsandsettings\desktop\test.xsl"..
    Plz suggest me
    Regards
    Rajesh

    Hi,
    You have to first upload this file using fileupload UI element.
    Then you can do the rest.
    Following tutorial will explain you it in detail
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    Regards
    Ayyapparaj

  • How do i get the path of the file selected for opening in JFileChooser

    hi
    I need to get the path of the file selected for opening or saving in the JFileChooser dialog box.Is there any method available.if not how do i get that?
    Thanks and Regards
    Saminathan.

    don't know if its the best/only way, but you could use the getSelectedFile() method in JFileChooser which returns a file and then use the getAbsolutePath() file method

  • How do I alter the bytes of a Class file to add calls to the methods?

    If i had the bytes of a class file, and I wanted to alter the bytes that constitute each method for the class so that it included a call to the security manager, how would i do it?
    1. How would I know which bytes were the opening of a method?
    2. how would I know what the name of the method is?
    3. How would I create bytes for something like:
       SecurityManager sm = System.getSecurityManager().checkPermission(thismeth, subject);
    4. I assume that if by some miracle I can do the above, then all I have to do is call defineClass(...) in ClassLoader and send it the new bytes, right?
    Thanks to all!

    OK, if it will help anyone get me the answers here, I found a class on the internet that can read a class file and tell you where in the bytes a method occurs and what its name is, and how long it is. What I need now is how to convert a call into the correct manner of bytes.
    For example, so I could add the bytes that would do:
       System.out.println("Added!");
    The class that reads a class file:
    /* Inspector.java by Mark D. LaDue */
    /* June 24, 1997 */
    /* Copyright (c) 1997 Mark D. LaDue
       You may study, use, modify, and distribute this example for any purpose.
       This example is provided WITHOUT WARRANTY either expressed or implied.  */
    /* This Java application analyzes the entries in the constant pool and locates
       the code arrays in a Java class file. Each entry in the constant pool
       yields the following information:
       Index     Tag     Reference(s)/Value(s)
       where "Index" is its position within the class file's constant pool,
       "Tag" is the official tag number for that type of entry, and
       "Reference(s)/Value(s)" contains the constant pool information
       according to the entry's type.  (See Lindholm and Yellin's "The Java
       Virtual Machine Specification" for details.)  For each code array in
       the class file, its starting byte, its total length, and the name of
       the method in which it occurs are given.  Combining this information
       with the information yielded by the humble "javap" utility gives one
       sufficient information to hack the code arrays in Java class files. */
    import java.io.*;
    class Inspector {
        public static void main(String[] argv) {
            int fpointer = 8; // Where are we in the class file?
            int cp_entries = 1; // How big is the constant pool?
            int Code_entry = 1; // Where is the entry that denotes "Code"?
            int num_interfaces = 0; // How many interfaces does it use?
            int num_fields = 0; // How many fields are there?
            int num_f_attributes = 0; // How many attributes does a field have?
            int num_methods = 0; // How many methods are there?
            int num_m_attributes = 0; // How many attributes does a method have?
            int[] tags; // Tags for the constant pool entries
            int[] read_ints1; // References for some constant pool entries
            int[] read_ints2; // References for some constant pool entries
            long[] read_longs; // Values for some constant pool entries
            float[] read_floats; // Values for some constant pool entries
            double[] read_doubles; // Values for some constant pool entries
            StringBuffer[] read_strings; // Strings in some constant pool entries
            int[] method_index;
            long[] code_start;
            long[] code_length;
    // How on earth do I use this thing?
            if (argv.length != 1) {
                System.out.println("Try \"java Inspector class_file.class\"");
                System.exit(1);
    // Start by opening the file for reading
            try {
                RandomAccessFile victim = new RandomAccessFile(argv[0], "r");
    // Skip the magic number and versions and start looking at the class file
                victim.seek(fpointer);
    // Determine how many entries there are in the constant pool
                cp_entries = victim.readUnsignedShort();
                fpointer += 2;
    // Set up the arrays of useful information about the constant pool entries
                tags = new int[cp_entries];
                read_ints1 = new int[cp_entries];
                read_ints2 = new int[cp_entries];
                read_longs = new long[cp_entries];
                read_floats = new float[cp_entries];
                read_doubles = new double[cp_entries];
                read_strings = new StringBuffer[cp_entries];
    //Initialize these arrays
                for (int cnt = 0; cnt < cp_entries; cnt++) {
                    tags[cnt] = -1;
                    read_ints1[cnt] = -1;
                    read_ints2[cnt] = -1;
                    read_longs[cnt] = -1;
                    read_floats[cnt] = -1;
                    read_doubles[cnt] = -1;
                    read_strings[cnt] = new StringBuffer();
    // Look at each entry in the constant pool and save the information in it
                for (int i = 1; i < cp_entries; i++) {
                    tags[i] = victim.readUnsignedByte();
                    fpointer++;
                    int skipper = 0;
                    int start = 0;
                    int test_int = 0;
                    switch (tags) {
    case 3: read_ints1[i] = victim.readInt();
    fpointer += 4;
    break;
    case 4: read_floats[i] = victim.readFloat();
    fpointer += 4;
    break;
    case 5: read_longs[i] = victim.readLong();
    fpointer += 8;
    i++;
    break;
    case 6: read_doubles[i] = victim.readDouble();
    fpointer += 8;
    i++;
    break;
    case 7:
    case 8: read_ints1[i] = victim.readUnsignedShort();
    fpointer += 2;
    break;
    case 9:
    case 10:
    case 11:
    case 12: read_ints1[i] = victim.readUnsignedShort();
    fpointer += 2;
    victim.seek(fpointer);
    read_ints2[i] = victim.readUnsignedShort();
    fpointer += 2;
    break;
    // This is the critical case - determine an entry in the constant pool where
    // the string "Code" is found so we can later identify the code attributes
    // for the class's methods
    case 1: skipper = victim.readUnsignedShort();
    start = fpointer;
    fpointer += 2;
    victim.seek(fpointer);
    for (int cnt = 0; cnt < skipper; cnt++) {
    int next = victim.readUnsignedByte();
    switch (next) {
    case 9: read_strings[i].append("\\" + "t");
    break;
    case 10: read_strings[i].append("\\" + "n");
    break;
    case 11: read_strings[i].append("\\" + "v");
    break;
    case 13: read_strings[i].append("\\" + "r");
    break;
    default: read_strings[i].append((char)next);
    break;
    victim.seek(++fpointer);
    victim.seek(start);
    if (skipper == 4) {
    fpointer = start + 2;
    victim.seek(fpointer);
    test_int = victim.readInt();
    if (test_int == 1131373669) {Code_entry = i;}
    fpointer = fpointer + skipper;
    else {fpointer = start + skipper + 2;}
    break;
    victim.seek(fpointer);
    // Skip ahead and see how many interfaces the class implements
    fpointer += 6;
    victim.seek(fpointer);
    num_interfaces = victim.readUnsignedShort();
    // Bypass the interface information
    fpointer = fpointer + 2*(num_interfaces) + 2;
    victim.seek(fpointer);
    // Determine the number of fields
    num_fields = victim.readUnsignedShort();
    // Bypass the field information
    fpointer += 2;
    victim.seek(fpointer);
    for (int j=0; j<num_fields; j++) {
    fpointer += 6;
    victim.seek(fpointer);
    num_f_attributes = victim.readUnsignedShort();
    fpointer = fpointer + 8*(num_f_attributes) + 2;
    victim.seek(fpointer);
    // Determine the number of methods
    num_methods = victim.readUnsignedShort();
    fpointer += 2;
    // Set up the arrays of information about the class's methods
    method_index = new int[num_methods];
    code_start = new long[num_methods];
    code_length = new long[num_methods];
    //Initialize these arrays
    for (int cnt = 0; cnt < num_methods; cnt++) {
    method_index[cnt] = -1;
    code_start[cnt] = -1;
    code_length[cnt] = -1;
    // For each method determine the index of its name and locate its code array
    for (int k=0; k<num_methods; k++) {
    fpointer += 2;
    victim.seek(fpointer);
    method_index[k] = victim.readUnsignedShort();
    fpointer += 4;
    victim.seek(fpointer);
    // Determine the number of attributes for the method
    num_m_attributes = victim.readUnsignedShort();
    fpointer += 2;
    // Test each attribute to see if it's code
    for (int m=0; m<num_m_attributes; m++) {
    int Code_test = victim.readUnsignedShort();
    fpointer += 2;
    // If it is, record the location and length of the code array
    if (Code_test == Code_entry){
    int att_length = victim.readInt();
    int next_method = fpointer + att_length + 4;
    fpointer += 8;
    victim.seek(fpointer);
    code_length[k] = victim.readInt();
    code_start[k] = fpointer + 5;
    fpointer = next_method;
    victim.seek(fpointer);
    // Otherwise just skip it and go on to the next method
    else {
    fpointer = fpointer + victim.readInt() + 4;
    victim.seek(fpointer);
    // Print the information about the Constant Pool
    System.out.println("There are " + (cp_entries - 1) + " + 1 entries in the Constant Pool:\n");
    System.out.println("Index\t" + "Tag\t" + "Reference(s)/Value(s)\t");
    System.out.println("-----\t" + "---\t" + "---------------------\t");
    for (int i = 0; i < cp_entries; i++) {
    switch (tags[i]) {
    case 1: System.out.println(i + "\t" + tags[i] + "\t" + read_strings[i].toString());
    break;
    case 3: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i]);
    break;
    case 4: System.out.println(i + "\t" + tags[i] + "\t" + read_floats[i]);
    break;
    case 5: System.out.println(i + "\t" + tags[i] + "\t" + read_longs[i]);
    break;
    case 6: System.out.println(i + "\t" + tags[i] + "\t" + read_doubles[i]);
    break;
    case 7:
    case 8: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i]);
    break;
    case 9:
    case 10:
    case 11:
    case 12: System.out.println(i + "\t" + tags[i] + "\t" + read_ints1[i] + " " + read_ints2[i]);
    break;
    System.out.println();
    // Print the information about the methods
    System.out.println("There are " + num_methods + " methods:\n");
    for (int j = 0; j < num_methods; j++) {
    System.out.println("Code array in method " + read_strings[method_index[j]].toString() + " of length " + code_length[j] + " starting at byte " + code_start[j] + ".");
    System.out.println();
    // All the changes are made, so close the file and move along
    victim.close();
    } catch (IOException ioe) {}

  • Regarding the re-display of the path of an Upload File.

    Is there a way to re-display the path of the Upload File?
    I have browse this on the internet and they say that the browser itself prohibits this for security reasons. (Please correct me if I'm wrong)
    Please help.
    Thanks in advance!

    i think i already got your problem.. what you wanted to do is to autoset the path of the file on the file element.. this cannot be done.. security is the main concern here.. if the browser allows you to set the value of the path a file on you client then many developers will make program that will get files from their client without user intervetion.. this will result to hacking of files on your clients computer..

  • Dot in the Path to the Class

    Hi,
    I am trying to run a program that has a "dot" in its path, i.e. /path/to/.dir/MyClass. It seems like JVM command line doesn't accept dot and it converts it to "/" from what I see on the output. Is there a way to enforce the command line to take the path to the class as is and not to convert "." to "/"?

    Hi,
    Yes, this is being run on a Linux system by `crond' which prompted a suspension that it wasn't being run at all. So I tried it manually on the command line and realized it doesn't recognize the path to the class.
    java /home/myuser/.dir/MyClass
    Exception in thread "main" java.lang.NoClassDefFoundException: /home/myuser//dir/MyClassRunning the class from the hidden directory works accordingly:
    cd /home/myuser/.dir
    java MyClass
    /* Right output */I have also tried quotations around the path in no vain

  • Is there any FM to separate the path from the file ?

    I have a file given by WS_FILENAME_GET. I want the path and the file in different fields. How can I split them?
    thank you

    hi,
    or use:
    data delimiter value '\'.
    split file at delimiter into table sptab.
    1) file = last entry
    loop at sptab.
    endloop.
    2) dir
    delete sptab.    "del file
    loop at sptab.
    concatenate string sptab delimiter into string.
    endloop.
    A.
    Message was edited by:
            Andreas Mann

  • Getting the path of  a resource file inside the context

    I am trying to migrate some of our applications running on OracleApplicaiton Server. We have data resource xml file needs to use in the applicaiton. In Oracle Application server we used to give the actual path of the xml file to load the xml file to the parsers since we know the path of the directories after deploying the application as an ear file. How can I get the path of the files in weblogic after deployment. If this is not supported what is the alternative to get the relative path of that xml file to load in ? The xml file is in the root folder of the context.
    THanks
    Suneesh

    Hi Suneesh,
    Please try enabling the <show-archived-real-path-enabled> Tag to TRUE ...And then everything will work fine with the following code:
    context.getRealPath()
    At domain level in config.xml. For example:
    <web-app-container>
    <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
    </web-app-container>
    *****OR *****
    At the web app level in weblogic.xml. For example:
    <container-descriptor>
    <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
    </container-descriptor>
    For Archived Applications , It is always a best practice to use the getResourceAsStream() rather than using getResource().......Below code snippet should workout in 99% cases
    InputStream stream=this.getClass().getClassLoader().getResourceAsStream("someXMLorPropfile.properties");
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/?p=408  (Middleware Magic is Here)

Maybe you are looking for

  • Security Question and Awnser

    Hallo, i want to modifiy with WD or "Portal Component" the "security question" and "the answer of the security question" for a user. I want to develop my own "my profiles" application. It's realy easy to develop "my profiles" without the "security gu

  • Message Tracking Question

    We installed a C150 in our office and we enabled Message tracking on the day we installed the device. However when we try to find messages all the way back to October (the 13th, the day we installed it) there were no results found. At the top of the

  • WCCP Configuration HTTP and HTTPS

    Looking for anyone that might have a clue in on this, im attempting to configure a pair of routers to use WCCP to redirect HTTP and HTTPS traffic to two content keeper devices. The network im building is going to be used for a guest internet connecti

  • What's the best way to play a very short sound?

    I'm writing a swing application, I want to play a beep (a very short wav file) every time I press a button. (a bit like the alert sound in windows) I know there're different ways to play sound. I don't want to use a full-feature sound library because

  • Cannot start the setup of Oracle Client 8.1.6 on Pentium 4 Windows 2000 Professional

    I need to install the Oracle Client 8.1.6 on a Compaq Evo D500 Workstation running Pentium 4 1.5GHz with 20G hard disk 128MB ram with OS Windows 2000 Professional. The autorun screen popup but no response when I press the Install/Uninstall products.