How to get the properties of my system ?

Hi,
does someone know how to get the properties of my system (like RAM,processor,OS ...) ?
Thanks, Fred.

Hi!
Try this:
import java.util.Properties;
public class Props {
     public static void main(String[] args) {
          // This shows all the properties
          System.getProperties().list(System.out);
          // This retrieves a special property
          System.out.println(System.getProperty("java.runtime.name"));
          // Here is to get total system memory
          long totalMemory = Runtime.getRuntime().totalMemory();
          System.out.println("Total memory: "+totalMemory);
          // Here is to get free system memory
          long freeMemory = Runtime.getRuntime().freeMemory();
          System.out.println("Free memory: "+freeMemory);
}Hope it helps!
/Andrew

Similar Messages

  • [E2010][EWS-XML][JAVA]How to get the properties of meeting rooms in Exchange 2010 using EWS Java API

    When you look at meeting room properties in Outlook 2010, you can see 'City', 'Country/Region' and 'Department' information.
    Is there any way to get this information using EWS Java API? 

    Hi Glen,
    I am able to understand what u have said, but do not know how to implement it with meeting rooms....
    If i am implementing
    "Get all appointments between startDate and endDate in the specified folder, including recurring meeting occurrences" in ews-java-api, as you have mentioned above, i am able to get only my appointments from the start date to end date , as i
    have given my email id and password, how to get my organization meeting room details, booked or not.
    static ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
    public static void main(String[] args) throws Exception {
    // TODO Auto-generated method stub
    ExchangeCredentials credentials = new WebCredentials("[email protected]", "zzzz");
    service.setCredentials(credentials);
    try {
    System.out.println("Check");
    service.autodiscoverUrl("[email protected]",new RedirectionUrlCallback());
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    NameResolutionCollection nameResolutions = service.resolveName("SDB1",ResolveNameSearchLocation.DirectoryOnly, true);
    System.out.println("nameResolutions==="+nameResolutions.getCount());
    for(NameResolution nameResolution : nameResolutions)
    System.out.println("NAME==="+nameResolution.getContact().getDisplayName());
    The above code gives me the output like, the meeting room in my organization with word SDB1 are
    Output:
    nameResolutions===2
    NAME===SDB1- TELCON - 1
    NAME===SDB1-TELCON - 2
     for. eg. I need to know today at what are the appointments in the room SDB1-TELCON2 and who all have booked the room.
    I do not know how to implement for the meeting room can you please help me how to give it.
    Thanks in advance.

  • How to get the properties of application anywhere in the project?

    Hello,
    Application
         |__Component1
                   |___Component2
                                 |___Component3 -----> Component4 ( as Popup)
    this is the actal scenario in my flex application..
    Do you know any best way to access the properties on the Application Object ??
    i want to set the popup component in the middle of the browser screen..
    for that i have tried the way...
    - Component 4
    <!-- PopupWindow.mxml -->
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx">
         <s:layout>
              <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
         </s:layout>
         <s:BorderContainer id="bcPopupWindow" width="700" height="500" backgroundAlpha="0.8" borderAlpha="0.5"
                           borderVisible="true" cornerRadius="20" dropShadowVisible="true">
    ==     Some designing part   ==
         </s:BorderContainer>
    </s:Group>
    and for showing this
    in Component 3 -
    protected function btnShowPopup_clickHandler(event:MouseEvent):void
         myPopup= new PopupWindow();
         myPopup.width = this.parent.parent.parent.width;
         myPopup.height =this.parent.parent.parent.height;
         PopUpManager.addPopUp(myPopup,this,true);

    hi
    try changing this line:
    PopUpManager.addPopUp(myPopup,this,true);  //adds popup to current object
    to this:
    PopUpManager.addPopUp(myPopup, root, true); //adds popup to top level object
    it should fix the popup not centering properly - it is centering itself, but with respect to the current visual object (where your open popup code is). changing to root will add the popup to the top level and so centering it there will center it with respect to the application itself.
    also, add this line below the one above:
    trace(FlexGlobals.topLevelApplication.width);
    and see what it traces out (in debug mode) - is it giving the correct value?

  • How To Get the Properties in the Configuration File

    I have a configuration file in the class path. the content of the file rough looks like below:
    DISABLE_PASSWORDLESS_AUTH = true
    REQUIRE_ACTIVATION = false
    ENABLE_RSS = true
    ENABLE_WATCH = true
    ENABLE_ATTACHMENT = true
    MAX_ATTACHMENT_SIZE = 1024
    ENABLE_LOGIN_INFO_IN_SESSION = true
    ENABLE_LOGIN_INFO_IN_COOKIE = true
    ENABLE_LOGIN_INFO_IN_REALM = false
    ENABLE_LOGIN_INFO_IN_CUSTOMIZATION = falseHow do I write Java code to pick up the value of the property; for example, ENABLE_RSS, in the configuration file?

    One slight correction:
    String path = "/path/to/topOfClassPath/";
    InputStream is = getClass().getResourceAsStream(path + "properties.conf");jfbriere's code would try to load the properties from the same location in the ClassPath (e.g. package) from where the class is located. Got bit by that one more than once. I usually try to locate items like this in a "/resources" package located at the "top" of the ClassPath so I always know where they are and use a fully qualified path to load them - e.g.
    getResourceAsStream("/resources/application.properites");

  • How to get the factory shipped operating system (windows 8.1) for hp notebook 15?

    i bought is this new hp notebook 15 with 8.1 preinstalled but unfortunately the system crashed. i tried to recover the windows using hp recovery tool but it wont work. so i downloaded a new windows from microsoft. the main problem is that the new windows wont activate through the OEM key already present in the BIOS. i have contacted hp. they said that my new windows was a retails version and i have to get a factory shipped OS? where can i get a factory shipped OS? do i have buy a New windows?

    so do i have to buy a recovery media?
    I have contacted hp support and told them about the whole problem but a i have to wait for that.... so here it is
    i bought this new hp notebook 15 and after two weeks the windows crashed and i didn't even created a recovery media. so i downloaded a new windows from microsoft. After that when i tried to activate the windows through OEM key it won't activate and gave some error. Then i contacted the hp support center and they suggested that the new windows i have installed is a retails version and i order to get to activate windows through OEM key i need a Factory Shipped OS. NOw i just need to know whether i have to buy a new windows? or hp can give me a FActory shipped os on demand or can i download a  factory shipped operating system anoter site (other than Micosoft)?

  • How to get the current date ? in the form of dd/mm/yyyy?

    Hi all,
    As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
    Regards
    Ashvini

    HI,
    Than u for the reply. But i am getting one error.
    as u said, I tried to do so.........
    but, i am getting one error.
    code
    Calendar cald=(Calendar.getInstance.getTime());
    out.println(cald);
    error message
    validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
    Calendar cald=(Calendar.getInstance.getTime());
    ^
    1 error
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    Pls help
    Regards,
    Ashvini

  • How to get the size of driver[C: or D:]

    Hi Friends,
    I have a query regarding to java..
    I want to get the name of all the drives that r connected to the System including network drives...
    and how to get the size of any system drive[For example C: or D: Drive].
    I want the output to be displayed like in the following format
    Device type size free Usage_Space
    for ex.
    C: NTFS 37.5Gb 30.5gb 7gb
    Output like as linux command df -h
    Edited by: KituPrash on Mar 4, 2009 3:29 AM

    Does this help for starters?
    File[] roots= File.listRoots();
    for (int i= 0; i< roots.length; i++)
         System.out.println(roots[i]+": "+roots.getTotalSpace());kind regards,
    Jos                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get the system info in a network

    Hi to all.
    can any one tell me how to get the system related,like system name and logged user ,info in a network using java...
    thnx in advance,
    ashok

    There is quite a bit of data that is stored in the System Properties. Run this little test app and it'll display all of the System Properties, what you are looking for may be contained in there:
    public class Test {
        public static void main(String[] args) {
            System.getProperties().list(System.out);
    }

  • How to get the local file system path of an image that loaded into the image component in cq5?

    Hi,
    I'm having hard time uploading image from filesystem where as drag and drop works.
    I'm not getting a path of image selected from filesystem.
    here is my code..
    private String populateImage() throws Exception {
                        if (currentNode != null && currentNode.isNode()) {
                                       Node ImageNode = JcrResourceUtil.createPath(currentNode, "image",
                                                                          null, "nt:unstructured", true);
                                       imageUrl = ImageNode.hasProperty("fileReference") ? ImageNode.getProperty("fileReference").getValue().getString() : "";
           imageUrl = imageUrl.trim();
            log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE IF IS: " + imageUrl);
                        } else {
                                            imageUrl = properties.get("fileReference", "");
                                            imageUrl = imageUrl.trim();
                                            log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE ELSE IS: " + imageUrl);
                        return imageUrl;
    So if I drag and drop..
    ImageNode.hasProperty("fileReference") is returning a valid path
    but if I upload an image  it is returning Null.
    So how to get the path? any suggestions around would be appreciated...

    When you say path you mean you want the path to print out in your HTML? Is that accurate? If so you generally need to constructe that path based on the path to the current component. So if you component is located at /content/mysite/en/about/mypage/jcr:content/parsys/image then the path to the image would generally be something like /content/mysite/en/about/mypage/jcr:content/parsys/image.img.jpg/1283829292873.jpg. The .img. selector triggers the servlet associated with the foundation parbase - /libs/foundation/components/parbase/img.GET.java. The reason you reference it this way is that there is no filesystem path to the image - it is stored in the repository not on the file system, and it requires a servlet or script to ge the binary from the repository and steam it.
    Normally the way you'd construct this is to use the out of the box Image class - so look at /libs/foundation/components/image/image.jsp. Now this example assumes that your component where you loaded the image extends /libs/foundation/components/parbase. If it doesn't then you either have to change your sling:superResourceType to /libs/foundation/components/parbase or some other component that does exten /libs/foundation/components/parbase.

  • How to get the system time in a Swing application ?

    I know how to do it in JavaScript, but not java. Please help me, and also how to get the system time in an Applet. Thanks !!!

    Check this link, I hope it helps
    http://202.71.136.142:8080/globalleafs/Swing/View.jsp?slno=22&tbl=0

  • How to get the user created at and modified at properties for a site collection using powershell

    Hi guys, I Know how to get the list of users of a site collection by Get-SPUser cmdlet but hte problem is that this cmdlet doesnt give me the user Created at and modifed at properties 
    can any one tell me how to get these values via powershell???? 
    ps: ignore the 2013 screenshot.. i just want a way to get those values .. if you provide me solution in either 2010 or 2013 , i will crack the other..
    plz guys help me ...

    Get the User Information list and then get the user from that list
    $web = Get-SPWeb "siteUrl"
    $userInfoList = $web.SiteUserInfoList
    $userItem = $userInfoList.Items[0]; #0 here is just for demonstration. You take the user you want here or loop through all users.
    $created = $userItem["Created"]
    $modified = $userItem["Modified"]

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get the current logical system?

    Dear Abapers:
    I can't find the logical system value from the table SYST, pls tell me how to get the current logical system name, Thanks!

    Hi,
    Check with the table T000, the Logical system field name is LOGSYS.
    Regards
    Thiru

  • How to get the User ID's details in SRM Workflow EBP system

    Hi Team
    How to get the User ID's details in SRM Workflow EBP system. Example like i have User ID "BTEMPEST" but i want his full name . so please suggst me how to get the full name of user id where it is maintained.
    Thanks.
    Puneet.

    Thank you very much muthu.
    For your information FM "RSPLPPM_GET_USERDETAILS" is working fine.
    Thanks for quick response.
    Thanks
    Puneet.

  • How to get the list of roles assigned to a user in all the child systems

    how to get the list of roles assigned to a user in all the child systems from CUA SYSTEM

    Try transaction SUIM in your CUA system. Go to user, cross-system information, users by roles. If you run it wide open, you'll get all users and all roles assigned for all systems managed in your CUA.
    Krysta

Maybe you are looking for