How to get the root directory of a domain?

I have a domain setup at
C:\bea\user_projects\domains\myDomain
I have tried the following;
Getting the domain object : get attr DomainConfiguration from DomainRuntimeServiceMBean
Get root dir : get attr RootDirectory from domain object
It returns ".", but I need the full path.
Is there an issue with the RootDirectory from domain object or in my approach?

John,
OK. If you want to go the JMX route, have a look at the CurrentDirectory attribute of the ServerRuntime mbean. It would report your directory as this:
C:\bea\user_projects\domains\myDomain\.
Mike
Weblogic/J2EE Security Blog: http://monduke.com

Similar Messages

  • How to get the root view of a UIView?

    How to get the root view of a UIView?

    Hi, loop through the superview property until it's nil. I suggest implenting it as a category:
    @implementation UIView (whatever)
    - (UIView *)rootView;
    @end
    - (UIView *)rootView
    UIView *rootView = self;
    while (rootView.superview) rootView = rootView.superview;
    return rootView;
    Warning: typed from memory, so not guaranteed to be errorfree.

  • How to get the root node of a tree?

    I wanna get all the leaf node of a tree.But JTree have no method about how to get the root TreeNode of a tree.Then how should I do?

    try this:
    http://javaalmanac.com/egs/javax.swing.tree/GetNodes.html?l=rel

  • How to get the root class in call heirarchy

    Hi,
    Is anybody have some idea regarding the getting name of a class whose, main method was called at the time of begining. In other words if we say, how can we get the invoker class of a java program with multiple level of inheritence.
    Regards

    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder db=factory.newDocumentBuilder();
         Document doc=db.parse(new File(ur xml file"));
         Element root=doc.getDocumentElement();
         System.out.println("root "+root.getNodeName());

  • How to get the \filter directory from registry (or other) during installation of the plugin

    Hello
    I made a script to install the plugin because it needs some libraries to be installed as well, but during the installation, the filter directory isn't defined (it isn't the same for each platform or language)
    for example my filter folder is :
    E:\Program_Files\Photoshop CS2\Modules externes\Filtres
    how do i get this filter directory from registry (or with another way)
    thanks a lot
    Jeff

    sorry i made a little mistake (didn't poste the updated version of my code)
    here is the right code:
    [Code]
    var
      maxnb8bf : Integer;
      maxDirectory:        String;
      nb8bf : Integer;
      PreviousDirectory:        String;
    procedure ProcessDirectory (RootDir: String; Progress: Boolean);
    var
    NewRoot:        String;
    FilePath:        String;
    FindRec:        TFindRec;
    n1 : Integer;
    n2 : Integer;
    begin
    NewRoot := AddBackSlash (RootDir);
    if FindFirst (NewRoot + '*', FindRec) then
    begin
    try
    repeat
    if (FindRec.Name <> '.') AND (FindRec.Name <> '..') then
    begin
    FilePath := NewRoot + FindRec.Name;
    if FindRec.Attributes AND FILE_ATTRIBUTE_DIRECTORY > 0 then
    ProcessDirectory (FilePath, Progress)
    else
    begin
            if (NewRoot <> PreviousDirectory) THEN
            begin;
               if (maxnb8bf < nb8bf) THEN
               begin;
                   maxnb8bf := nb8bf;
                   maxDirectory := PreviousDirectory;
               end;
               nb8bf := 0;
            end;
            n1 := Pos('.8bf', FilePath);
            n2 := Pos('.8BF', FilePath);
            if ((n1 > 0) or (n2 > 0)) THEN
            begin;
               nb8bf := nb8bf + 1;
            end;
            PreviousDirectory := NewRoot;
    end;
    end;
    until NOT FindNext (FindRec);
    finally
    FindClose(FindRec);
    end;
    end;
    end;
    function InitializeSetup(): Boolean;
    var
      V: string;
    begin
      if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Photoshop.exe', 'Path', V) then
        MsgBox('Value is "' + V + '"', mbInformation, MB_OK);
      Result := TRUE;
       maxDirectory := '';
       nb8bf := 0;
       PreviousDirectory := '';
       maxnb8bf := 0;
       ProcessDirectory (V, true);
       //if (maxDirectory <> '') THEN
       // begin;
       //      MsgBox('Value is "' + maxDirectory + '"', mbInformation, MB_OK);
       // end;
    end;
    function NewTargetDir(Param: String): String;
    begin
      Result := maxDirectory;
    end;
    Regards

  • How to get the root tag name

    I have a problem: I receive several XML files in my transaction input
    <?xml version="1.0" encoding="UTF-8"?>
    <NAMES>
    </NAMES>
    <?xml version="1.0" encoding="UTF-8"?>
    <VALUES>
    </VALUES>
    and I want to obtain the root tag name (the string NAMES, VALUES, ecc.).
    I obtained this result using a XSL transformation, bui I think that the best (and easiest) way is to use an XPath command. I tried but I can not find the right command.
    Does anybody know how to do this?

    I found it:
    Transaction.Source{name(/*)}

  • How to get the current directory as File object

    Hi guys,
    i want to get the current working directory as a file object.
    plz help me on that if there are any standard methods present for this.

    new File(".");

  • How to get the Current Directory

    Hi,
    I need to tell the system to read a file in my current directory. How do I tell the system what the current Directory Path is
    Thankx in advance...

    It depends on the current working directory from which you start your JVM.
    From DOS or UNIX shell this is the directory where you have come by "cd".
    On Windows you can do the same from Explorer or other file managers: the directory where you are when starting JVM.exe.
    If you define shortcuts - e.g. on the desktop -, you specify it there as the "working directory".
    You can retrieve this directory by
    System.getProperty( "user.dir" )
    Now with File classes:
    Each file name without path will be interpreted as being in this directory.
    Absolute paths are clear.
    But you can't mix this:
    If you specify "test/debug.ini" or "test\\debug.ini" from debug directory: false!
    If you specify "../debug.ini" or "..\\debug.ini" from debug/test directory: false!
    Do it this way:
    Start from debug directory.
    So you can access file debug/test/debug.ini as
    System.getProperty( "user.dir" ) + "/test/debug.ini"
    Works?

  • How to get the root node for a child using connect by prior

    Hi,
    I searched at many places to do this but not able to get the exact o/p sp posting my question here.
    I have a table with parent_id and child_id columns. The levels of this parent_child can be many but my aim is to find the ultimate parent ( dont know the right term)
    like if I have a child_node= xyz and its parent= pqr and its parents=lmn which might be ultimate parent which doesnt have any further parent.
    So if i start with child_code= "xyz" then i should get the parent as "lmn" and not the immediate parent "pqr".
    Please help.
    Thanks,
    Aashish

    To find the Parent on emp table:
    select empno,ename,level
    from emp
    where level=3
    start with empno=7934
    connect by  empno= prior mgrTo find the Child on emp table:
    select empno,ename,level
    from emp
    where level=1
    start with empno=7934
    connect by prior empno=  mgrBut you need to know the level or position to specify the level of parent or child. But there are some other possible options available if we can know the requirement properly.
    Edited by: Vasista on Jan 11, 2011 2:27 AM
    Edited by: Vasista on Jan 11, 2011 2:30 AM

  • How to get the current application root directory

    Hi Experts,
    I am deploying an ADF Application to a Standalone WLS 10.3. During development I am using Integrated WLS (which comes with JDeveloper 11.1.1.5.0). During development, I configured my application to create log files in my local machine (where Integrated WLS is running) by using absolute path for my log file. Now, I am moving to a standalone instance of WLS for testing (before moving to production).
    Now I need to keep my log files under my application root directory. Please let me know how to get the absolute path of the deployed application root directory from WLS ENV/System property into my application's Java Code.
    I tried the below java code,
    Current weblogic server name is: " + System.getProperty("weblogic.Name") --> This gives me the name of the server where my application is running.
    Current weblogic server name is: " + System.getProperty("weblogic.Root") --> This returns NULL. How to get the Root directory of my application using some system property inside my application at runtime??
    Thanks
    Rathnam

    One method is to create a File(""); and do getPath() on it.
    At least it's worked for me.

  • Get the file directory/location using JFileChooser

    Dear,
    How to get the file directory and it location with using JFilechooser after select the indicate file?
    Thanks

    There is an example at the top of JFileChooser's doc.
    http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JFileChooser.html

  • Get the root folder name once user will upload any files to subfolder with in this root folder using sharepoint designer WF??

    Hi,
    How to get the root folder name using sharepoint designer WF? i have a document library with root folders and subfolders. so i am trying to get the root specific root folder name attaching with email once user will
    upload any files to subfolders within that root folder.
    Thanks in advanced!

    Hi,
    According to your description, you might want to get the root folder name in SharePoint Designer Workflow when there is file uploading.
    The “Path” field of the current item holds the relative path of a file, as a workaround, you can retrieve the value of the “Path” as string, then split the string
    value with a delimiter character of “/” to meet your requirement.
    In SharePoint Designer 2010, there is no OOTB action to split the string. You can use the custom workflow actions below to achieve it.
    Here is a link about the related actions I use in this scenario:
    https://spdwfstringactions.codeplex.com/
    Settings of workflow as below:
    It works well in my environment:
    Best regards
    Patrick Liang
    TechNet Community Support

  • How can i get also the files in the root directory and how can i for testing add items of IEnumerable FTPListDetail to List string ?

    What i get is only the directories and files that in other nodes. But i have also files on the root directory and i never
    get them. This is a screenshot of my program after i got the content of my ftp. I'm using treeView to display my ftp content:
    You can see two directories from the root but no files on the root it self. And in my ftp server host i have files in the root direcory.
    This is the method i'm using to get the directory listing:
    public IEnumerable<FTPListDetail> GetDirectoryListing(string rootUri)
    var CurrentRemoteDirectory = rootUri;
    var result = new StringBuilder();
    var request = GetWebRequest(WebRequestMethods.Ftp.ListDirectoryDetails, CurrentRemoteDirectory);
    using (var response = request.GetResponse())
    using (var reader = new StreamReader(response.GetResponseStream()))
    string line = reader.ReadLine();
    while (line != null)
    result.Append(line);
    result.Append("\n");
    line = reader.ReadLine();
    if (string.IsNullOrEmpty(result.ToString()))
    return new List<FTPListDetail>();
    result.Remove(result.ToString().LastIndexOf("\n"), 1);
    var results = result.ToString().Split('\n');
    string regex =
    @"^" + //# Start of line
    @"(?<dir>[\-ld])" + //# File size
    @"(?<permission>[\-rwx]{9})" + //# Whitespace \n
    @"\s+" + //# Whitespace \n
    @"(?<filecode>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<owner>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<group>\w+)" +
    @"\s+" + //# Whitespace \n
    @"(?<size>\d+)" +
    @"\s+" + //# Whitespace \n
    @"(?<month>\w{3})" + //# Month (3 letters) \n
    @"\s+" + //# Whitespace \n
    @"(?<day>\d{1,2})" + //# Day (1 or 2 digits) \n
    @"\s+" + //# Whitespace \n
    @"(?<timeyear>[\d:]{4,5})" + //# Time or year \n
    @"\s+" + //# Whitespace \n
    @"(?<filename>(.*))" + //# Filename \n
    @"$"; //# End of line
    var myresult = new List<FTPListDetail>();
    foreach (var parsed in results)
    var split = new Regex(regex)
    .Match(parsed);
    var dir = split.Groups["dir"].ToString();
    var permission = split.Groups["permission"].ToString();
    var filecode = split.Groups["filecode"].ToString();
    var owner = split.Groups["owner"].ToString();
    var group = split.Groups["group"].ToString();
    var filename = split.Groups["filename"].ToString();
    var size = split.Groups["size"].Length;
    myresult.Add(new FTPListDetail()
    Dir = dir,
    Filecode = filecode,
    Group = group,
    FullPath = CurrentRemoteDirectory + "/" + filename,
    Name = filename,
    Owner = owner,
    Permission = permission,
    return myresult;
    And then this method to loop over and listing :
    private int total_dirs;
    private int searched_until_now_dirs;
    private int max_percentage;
    private TreeNode directories_real_time;
    private string SummaryText;
    private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
    var directoryNode = new TreeNode(name);
    var directoryListing = GetDirectoryListing(path);
    var directories = directoryListing.Where(d => d.IsDirectory);
    var files = directoryListing.Where(d => !d.IsDirectory);
    total_dirs += directories.Count<FTPListDetail>();
    searched_until_now_dirs++;
    int percentage = 0;
    foreach (var dir in directories)
    directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
    if (recursive_levl == 1)
    TreeNode temp_tn = (TreeNode)directoryNode.Clone();
    this.BeginInvoke(new MethodInvoker( delegate
    UpdateList(temp_tn);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    foreach (var file in files)
    TreeNode file_tree_node = new TreeNode(file.Name);
    file_tree_node.Tag = "file" ;
    directoryNode.Nodes.Add(file_tree_node);
    numberOfFiles.Add(file.FullPath);
    return directoryNode;
    Then updating the treeView:
    DateTime last_update;
    private void UpdateList(TreeNode tn_rt)
    TimeSpan ts = DateTime.Now - last_update;
    if (ts.TotalMilliseconds > 200)
    last_update = DateTime.Now;
    treeViewMS1.BeginUpdate();
    treeViewMS1.Nodes.Clear();
    treeViewMS1.Nodes.Add(tn_rt);
    ExpandToLevel(treeViewMS1.Nodes, 1);
    treeViewMS1.EndUpdate();
    And inside a backgroundworker do work how i'm using it:
    var root = Convert.ToString(e.Argument);
    var dirNode = CreateDirectoryNode(root, "root", 1);
    e.Result = dirNode;
    And last the FTPListDetail class:
    public class FTPListDetail
    public bool IsDirectory
    get
    return !string.IsNullOrWhiteSpace(Dir) && Dir.ToLower().Equals("d");
    internal string Dir { get; set; }
    public string Permission { get; set; }
    public string Filecode { get; set; }
    public string Owner { get; set; }
    public string Group { get; set; }
    public string Name { get; set; }
    public string FullPath { get; set; }
    Now the main problem is that when i list the files and directories and display them in the treeView it dosen't get/display
    the files in the root directory. Only in the sub nodes.
    I will see the files inside hello and stats but i need also to see the files in the root directory.
    1. How can i get and list/display the files of the root directory ?
    2. For the test i tried to add to a List<string> the items in var files to see if i get the root files at all.
       This is what i tried in the CreateDirectoryNode before it i added:
    private List<string> testfiles = new List<string>();
    Then after var files i did:
    testfiles.Add(files.ToList()
    But this is wrong. I just wanted to see in testfiles what items i'm getting in var files in the end of the process.
    Both var files and directoryListing are IEnumerable<FTPListDetail> type.
    The most important is to make the number 1 i mentioned and then to do number 2.

    Risa no.
    What i mean is this. This is a screenshot of my ftp server at my host(ipage.com).
    Now this is a screenshot of my program and you can see that in my program i have only the directories hello stats test but i don't have the files in the root: htaccess.config swp txt 1.txt 2.png....all this files i don't have it on my treeView.
    What i want it to be is that on my program on the treeView i will also display the files like in my ftp server.
    I see in my program only the directories and the files in the directories but i don't see the files on the root directory/node.
    I need it to be like in my ftp server i need to see in my program the htaccess 1.txt 2.png and so on.
    So what i wrote in my main question is that in the var files i see this files of the root directory i just don't know to add and display them in my treeView(my treeView is treeViewMS1).
    I know i checked in my program in the method CreateDirectoryNode i see in the first iteration of the recursive that var files contain this root files i just dont know how to add and display them in my treeView.
    On the next iterations when it does the recursive it's adding the directories hello stats test and the files in this directories but i need it to first add the root files.

  • How to get the current executing file/itself absolute directory?

    hellooo,
              gentlemen/lady, how to get the current executing file/itself absolute directory?
              thanks
              

              Hello,
              you can get the real path information of the JSP through the servlet context:
              http://java.sun.com/products/servlet/2.2/javadoc/index.html
              javax.servlet
              Interface ServletContext
              Method getRealPath
              Christian Plenagl
              Developer Relations Engineer
              BEA Support
              [email protected] (alex mok) wrote:
              >hellooo,
              >
              >gentlemen/lady, how to get the current executing file/itself absolute
              >directory?
              >
              >thanks
              

  • How can I get the working directory of a project from an Annotation Processor in Java

    I am writing an annotation processor in Java and in this annotation processor I want to be able to find a file in the Project hierarchy of the project on which I am using this annotation processor. Through the annotation I can pass in the path of the file I am searching for relative to the project root but i cannot retrieve the project's working directory.
    Let's say that the processor is MyCustomProcessor and I am using it on the project MyProject. I want to be able to access(read) a file (a properties file) from the project structure of MyProject from the "process" method of MyCustomProcessor.
    I have read this link Eclipse - Annotation processor, get project path but when I use their solution I get a null returned from the StandardJavaFileManager.getLocation(StandardLocation.SOURCE_PATH) call.
    Some more details regarding the implementation:
    MyAnnotationProcessor:
    @SupportedAnnotationTypes(value = {"MyAnnotation" })
    @SupportedSourceVersion(RELEASE_6)
    public class MyCustomProcessor extends AbstractProcessor {
    @Override public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
    for (final Element element : roundEnv.getElementsAnnotatedWith(MyAnnotation.class)) {
    <!-- Here is where I would like to get the working directory !-->
    More details about the testing and development environment: Eclipse Kepler, JRE 1.7.
    If you need more details just ask.

    There is an identical post with an answer located at this link.

Maybe you are looking for

  • R12 AP Trial Balance definition cod

    Hi all, We are trying create a New/Copied definition as follow : Payables Responsibility > Setup > Accounting Setups > Subledger Accounting Setups > Open Account Balances Listing Definitions Query the Report Definition Code Note: To search for Report

  • Root CA-How can I set my server the single CA in my own intranet?

    I have some confidential network(without any internet connection). How can I generate FULL certificate chain with my own CA (without requesting any external certificate)? Software is Solaris 9 (Sparc) & SunONE Portal Server. Sincerely. Yurry A. Buhar

  • Slow to assign IP

    I just got the new Airport Extreme Base Station, and am sorta happy with it... Has anyone else have the problem that the computer will connect the the base station quickly but getting a DHCP assignment takes forever? Can't figure it out. This happens

  • Netcfg/systemd not bringing up eth0 (static profile)

    I installed a fresh copy of Arch on a flash drive that will power my RAID server today. So far, it's almost perfect. The issue right now is that in netcfg fails to bring up a static eth0 profile at boot. I've got the netcfg.service enabled and if I d

  • Making photo books on iPad

    Is there a way to create photo books on the ipad2? One of the main reasons I purchased the ipad2 was to edit and organize photos with the touch screen. I love the feature on iphoto, but can't seem to find anything comparable on my ipad.