How to get path to windows

Hi, I need to locate the path to windows. I've found somewhere this instruction but it always returns null. This is what I have:
System.getProperty("com.ms.windir");
Any help please.
Roel

Just 'cos its deprecated doesn't mean you can't use it, and it certainly doesn't throw an exception - it just displays a warning when you compile it.
I've just done a quick check on System properties, and there isn't one for Windows directory. Abnormal's suggested method is cheating a bit - you're telling it what the directory is, rather than looking it up.
So I'm afraid it's either using getenv, or third party tools (the latter is preferred, as long as they're free!)
Robin

Similar Messages

  • Subject: How to get a rolling window  query of last 12 months?

    Subject: How to get a rolling window of last 12 months?
    I am developing a report on 0TCT_C21. I want to compare process chain execution time for every month for last twelve months to see a trending report.
    How can I determine this information dynamically, i.e., when report is run, let us say in Dec 2009, it will show me 12 columns: Jan to Dec 2009, but if report was run in Dec 2010, it will show   12 columns results from Jan to Dec 2010.
    Any information will be greatly appreciated.

    Hi,
    Keep offset value-1, -2, -3, ... -11 for 0Calmonth.

  • How to get the parent window in sub-child controller class in javafx?

    how to get the parent window in sub-child controller class in javafx?

    You can get the window in which a node is contained with
    Window window = node.getScene().getWindow();Depending when this is invoked, you might want to check the Scene is not null before calling getWindow().
    If the window is a stage that is owned by another window, you can get the "parent" or "owner" window with
    Window owner = null ;
    if (window instanceof Stage) {
      Stage stage = (Stage) window ;
      owner = stage.getOwner();
    }

  • How can get the console window name of the current form?

    How can get the console window name of the current form?

    Try the various get methods of the viewObject such as getQuery:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtAnchor.getQuery%28%29/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CViewObject%7Ehtml/

  • How to get path of a specified file

    how to get path of a specified folder
    my code is as follows: Iam using struts 1.2
    my directory structure in tomcat/webapp is as afollows:
    sfq
    |
    | _ _xml
    | |     
    | |_ _ sqx_read.xml
    |
    |__jsp
    |
    |__WEB-INF
         |
         |_ _classes
              |
              |_ _ReadXml.class
    Now i have to get the path of a sql_read.xml file which is in xml folder from ReadXml.java file. pls it's urgent

    Urgent or not, you can obtain the document root directory as
    ServletContext.getRealPath("/")

  • How to get path of downloaded file?

    Hi,
    I use JDeveloper 11g with ADF.
    I have to download file with original date. If i want to save date i have to zip file. After that to unzip. My queation is: when clien download file how to get path of downloaded file????
    Because, i want to save unziped file on location where client want to download.

    Hi,
    you cannot download a file directly to a client. If this is a requirement then you need a signed Java Applet to handle the download. Otherwise a download dialog is opened for the user to define where to store the file.
    Frank

  • How to get icloud on windows vista 32 bit?

    How to get Icloud on Window Vista 32 bit PC?

    Try using the installer from the following download location at Apple:
    iCloud Control Panel 2.1.3 for Windows Vista

  • How to get current PopUp Window

    Dear All,
    I am using NetWeaver 7.1 sp1 and facing a problem. Actually I want to show a view in popup window. The popup window works fine but i want to get currently popup window. How can i get it in View and controller ??
    I found a solution : wdContext.currentPopupElement().getWindowInstacnce();
    but in wdContext there is no method like .currentPopupElement(). plz help.

    Hi
    wdContext.currentPopupElement().getWindowInstacnce();
      Here PopupElement is a attribute of IWDWindow type where u have to put the window instances (say For close or life control of that popup)
    For further plz go through these doc
    1. [Dialog|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1&overridelayout=true]
    2. [Popup Window|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a04870c5-749b-2b10-06ba-d25515ef39e3&overridelayout=true]
    Best Regards
    Satish Kumar

  • How to Get the Login Window and/or Bypass Login Items?

    Greetings, folks!
    This is a silly question, but the old standby of “hold down the shift key” doesn’t work in 10.6.1:
    What key(s) need to be pressed to get the LogIn window and then after LogIn, to bypass LogIn Items?
    Thanks!!
    Richard Fairbanks

    Not here, on a fresh (erased) install.
    Pressed either before or after the initial gray Mac appears, the shift key does not access the LogIn screen. It is possible to bypass the account’s LogIn items by holding down the shift key after the LogIn screen has been called and successfully commenced, but how does one call the Login screen when the Mac is normally set up for automatic login?
    It used to be the shift key . . . 
    Thanks!

  • How to set Path on windows 98

    Hello!
    sorry for my bit knowledge on Java first.
    I am having a hard time to set a path in my windows 98.
    First, I did instal Java 2SDK version 1.4.0
    Then, I download j2EE RI server and documentation from sun's J2EE download site
    Then, I run the installer for both the J2EE and documentation
    then I did put these �set� command in a bat file.
    set JAVA_HOME = C:\j2sdk1.4.0
    set J2EE_HOME=C:\j2sdkee1.3.1
    set ANT_HOME=C:\ant\apache-ant-1.5.3.1
    set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin;%J2EE_HOME%\bin
    My last step was to check all logging output to the current shell. So I went to the command line and type j2ee -verbose. However I got the following error message.
    Microsoft(R) Windows 98
    (C)Copyright Microsoft Corp 1981-1999.
    C:\WINDOWS\Desktop>j2ee -verbose
    Bad command or file name
    can you please help me how to correct this. I don't know DOS much so I may type something wrong.
    any help is appreciated.
    Kimbra

    Yes, I ran into the same problem on my Win 98 laptop. I used the exact same set command, but the problem was, it seems than Windows 98 forgets the set command after a shutdown/reboot.
    Go into your autoexec.bat file (should be in your C:\ drive, as in C:\autoexec.bat, or I think you can type sysedit into the Run prompt (Start > Run) ) and then type in:
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\j2sdk1.4.0\bin;
    That worked for my laptop; I was able to run the javac and java programs in any directory, without referencing the full directory path each time.
    Sorry, but I can't help you on the apache problem, although I suspect all you need you do is add that directory path onto the above line.

  • How to get path of jar file

    I am using a class which is present in a jar file.
    There are lot of versions of this jar file are present on machine.
    I am accessing one class from this jar.
    How do I know which jar is used by application.
    How to get the path(path on machine like c:\java\lib) of this jar file.

    URL jarURL = this.getClass().getResource("/whatever.class");will return you a jar:// URL. Experiment with that. (Remember that "whatever.class" needs to be prefixed by the full name of the package the class is in.)

  • How to get imei on window Mobile???

    Hi All,
    I want to get IMEI number on Window Mobile using J2ME , how to get it?
    Thanks.

    Not covered in the general CLDC and MIDP API. Check the manufacturer's developer area, they may have a proprietary API that allows this.
    Any solution would certainly be manufacturer dependent, and may also be model dependent. A proprietary API is by its very nature supported only on certain models.
    db

  • How-to get path to a node in SPRO

    Hello guys,
    I'm working on a tool which creates automatic dcumentation tool of changes in SPRO. All goes fine except one thing:
    I need to generate a PATH to IMG ACTIVITY. I know the code of activity, I know it's HIER_GUID. What I need to get is all "parents" HIER_GUID of bottom node.
    So far I got only one FM - STREE_GET_PATH_TO_NODE. It's fine but it returns only the path to 03 level in SPRO. (01 - is top, 02 - are components).
    What I desperatly need is how to get a connection from 03 to 02 level.
    You can simulate the FM with following values:
    SEARCH_FOR_NODE-NODE_ID = 1C1B49FEC279D411AB74009027B70B8E
    SEARCH_FOR_NODE-TREE_ID = 367A8DF9ACEE16E7E10000009B38F976
    The result contain the highest node id 367A8DAFACEE16E7E10000009B38F976, which stands for "SAP Business Parnter" (according the table TNODEIMGT-NODE_ID).
    But the fact, that "SAP Business Partner" is in "Cross-Application Components" is unreachable for me.
    Do you know, how to get relevant node on level 02 ?
    All hints will be rewarded.
    Thank you
    Regards
    Tomas

    Hello guys,
    I'm working on a tool which creates automatic dcumentation tool of changes in SPRO. All goes fine except one thing:
    I need to generate a PATH to IMG ACTIVITY. I know the code of activity, I know it's HIER_GUID. What I need to get is all "parents" HIER_GUID of bottom node.
    So far I got only one FM - STREE_GET_PATH_TO_NODE. It's fine but it returns only the path to 03 level in SPRO. (01 - is top, 02 - are components).
    What I desperatly need is how to get a connection from 03 to 02 level.
    You can simulate the FM with following values:
    SEARCH_FOR_NODE-NODE_ID = 1C1B49FEC279D411AB74009027B70B8E
    SEARCH_FOR_NODE-TREE_ID = 367A8DF9ACEE16E7E10000009B38F976
    The result contain the highest node id 367A8DAFACEE16E7E10000009B38F976, which stands for "SAP Business Parnter" (according the table TNODEIMGT-NODE_ID).
    But the fact, that "SAP Business Partner" is in "Cross-Application Components" is unreachable for me.
    Do you know, how to get relevant node on level 02 ?
    All hints will be rewarded.
    Thank you
    Regards
    Tomas

  • How to get rid of window is configureing Macromedia  Contribute 3

    Can someone tell me how to get rid of the Window's installers
    is configureing Macromedia Contribute 3, everytime I a copying and
    pasteing text or pictures, this comes up and I have to hit cancel
    several times to get rid of it.

    sanman33 wrote:
    > Can someone tell me how to get rid of the Window's
    installers is configureing
    > Macromedia Contribute 3, everytime I a copying and
    pasteing text or pictures,
    > this comes up and I have to hit cancel several times to
    get rid of it.
    >
    Can you try the Contribute 3.11 updater link here
    https://www.adobe.com/cfusion/tdrc/index.cfm?product=contribute3
    Not sure if this works though.
    - Arun

  • How to get PAID from Windows Phone Store?

    I have more than 300 USD app proceeds in my Windows Phone Dev Account. But I am not getting paid. How to get paid?
    I have also a Windows Store Dev Account. Last month, it reached 200 USD and I got paid. But I am confused about the
    Windows Phone Dev account. It crossed the threshold amount 2 months ago. But I am not seeing any chance to get paid. Is this only happening to me? Or do I have to earn more app proceeds?
    Kindly reply me as soon as possible. Thank you!

    Hello Shahriar,
    To open up a Service Request ticket you can click this link below and then click “Select your type of problem here”. Follow the steps on the next few screens and once
    you have the Service Request number you can post it back into this thread and we can make sure it’s being looked after. The Service Request number should look similar to SRX127xxxxx.
    Where to open up a Service Request ticket
    http://dev.windows.com/en-us/community/support
    Best Regards,
    Joe
    Windows Developer Support
    Send us your feedback about the Windows Platform

Maybe you are looking for

  • How can I restore my icloud e-mail address?

    How can I restore my iCloud e-mail address?

  • How does one KEEP the gallery widget from moving on a page AFTER you've left the application?

    My gallery widgets are NOT stable.  I tried locking them, and locking the entire page... no luck.  What gives?  How can anyone put together a book if the gallery widget (which is crucial to my presentation) is not stable and moves, expands, etc..

  • All of a sudden i need a password?

    my airport extreme just took a vacation...the fans have no black...tells me it recognizes the network but that i need a wap password...never did before...any way to get back wireless? did i do something wrong? my sister used her pc here last night an

  • NetInfo not updating hosts

    I am trying to add a hosts entry (like old school /etc/hosts) on my iMac intel (10.4.5). I followed the apple instructions and used the netinfo utility to add the host under the machines branch. Everything LOOKS fine, but it doesn't work. For example

  • URL: 403 permission denied.

    I am figuring out how to use the URL class to connect to web sites. I was able to get the Google page (among others) by specifying the web address, no problem. But a Google query that would work by pasting it in Internet Explorer fails when the same