How can i get system configuration

how can i get RAM capacity, Hard disk size,cpu speed and list of all software installed in system, is there any method in java so that i can get all these information without JNI or JNI wrapper , if anybody know please help me
thanks

This will work for u
import java.util.*;
import java.io.*;
class SystemTest
     public static void main(String []s)
     Properties pr=new Properties();
     pr=System.getProperties();
     pr.list(System.out);
     System.out.println("\n"+ (Runtime.getRuntime().totalMemory())/(1024*1024) +" M Bytes");
     System.out.println("\n"+ (Runtime.getRuntime().maxMemory())/(1024*1024) +" M Bytes");
}

Similar Messages

  • How can I  get System dates  with time scheduler using threads

    how can I get System dates with time scheduler using threads.is there any idea to update Date in my application along with system Date automatic updation...

    What the heck are you talking about and whatr has it to do with threads?
    Current time: System.currentTimeMillis. Date instances are not supposed to be updated.

  • How can i get system variable using java

    Hi,
    I just want to know how can i get system variables using java code.
    for example i want to get the the date for today or i want to get the number of processes that's running.
    Thanks alot

    Hi,
    I just want to know how can i get system variables
    using java code.
    for example i want to get the the date for today or i
    want to get the number of processes that's running.
    Thanks alotSome generic "system variables" are available though Java, usually through the System class.
    Date today = new Date();
    is instantiated with the current date and time.
    Other system values, like environment values, should be passed to java through the command line (-D option) by setting system properties.
    Finally, platform specific values like the number of processes running will have to be written in platform specific code and executed by JNI (java native interface).
    Java is platform or system agnostic. Common system values, like time, are implemented. Hopefully you won't need platform specific values.

  • How can I get system properties?

    Hello,
    How can I get the system properties like %JAVA_HOME% in my java codes, for example, I want to print it like this.
    System.out.println("%JAVA_HOME%");
    but it doesn't work!
    Please give me a hand!

    To pass the Operating system environment variable to the Java "environment variables", you have to explicitely pass them on the command line eg.
    java -Dmyjava.home=%JAVA_HOME% myClass
    then, in your code use
    String JAVA_HOME = System.getProperty ( "myjava.home" );regards,
    Owen

  • How can i get system time and day

    How can i get the system current time and save it into a variable, then get the current day like wednesday and save it into another variable. Can someone teach me how to set this. thanks
    regards,
    albert

    How can i get the system current time and save it
    into a variable, then get the current day like
    wednesday and save it into another variable. Can
    someone teach me how to set this. thanks
    regards,
    alberti've managed to do this but in gui format hope it suites you.
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class time{
         private Container content;
              private JTextField timeField, dateField;
         public static void main (String[]args){
              time t = new time();
              t.TextClockWindow();
              t.showGUI();
         public void TextClockWindow() {
    // Build the GUI - only one panel
    JFrame frame = new JFrame();
    content = frame.getContentPane();
    timeField = new JTextField(6);
    timeField.setFont(new Font("sansserif", Font.PLAIN, 20));
    dateField = new JTextField(6);
    dateField.setFont(new Font("sansserif", Font.PLAIN, 20));
    content.setLayout(new FlowLayout());
    content.add(timeField);
    content.add(dateField);
    // Create a 1-second timer and action listener for it.
    // Specify package because there are two Timer classes
    javax.swing.Timer t = new javax.swing.Timer(1000,new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    Calendar now = Calendar.getInstance();
    int h = now.get(Calendar.HOUR_OF_DAY);
    int m = now.get(Calendar.MINUTE);
    int s = now.get(Calendar.SECOND);
    //String ampm =now.get(Calendar.AM_PM);
    int y =now.get(Calendar.YEAR);
    int mon=now.get(Calendar.MONTH);
    int d=now.get(Calendar.DAY_OF_WEEK);
    dateField.setText(""+y+ ". "+mon+ "."+d);
    timeField.setText("" + h + ":" + m + ":" + s);
    //to dispaly the current date so easily;stvworks
    String rightNow = "" + new Date();
    t.start(); // Start the timer
    }//end constructor
    public void showGUI(){
         JFrame frame = new JFrame("Time Frame.");
              frame.add(content);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
    frame.setResizable(false);
    frame.setVisible(true);

  • How can I get role configuration key in an abap program?

    Hello there!
    In a abap program I would like to get which configuration key it is running.
    The idea is, our abap program will decide which instruction execute depend on the current configuration key, but, we donu2019t know how to get this information.
    Does anybody know a BAPI, BADI or something like that to do this?
    Regards,
    Laercio

    Hi,
    Threre is no standard API provided for this however you can use following code snippet do get your jobe done.
         data: LV_PROFILE type ref to IF_CRM_UI_PROFILE.
         data: LV_ROLE type string.
         LV_PROFILE = CL_CRM_UI_PROFILE=>GET_INSTANCE( ).
         if LV_PROFILE is bound.
            LV_ROLE = LV_PROFILE->GET_PROFILE( ).
         endif.   
    Now, the LV_ROLE will contain the ID of the Business Role.
    If you're interested in the role config key you might add the following lines of code.
           if LV_PROFILE is bound.
             RV_RESULT = LV_PROFILE->GET_COMPONENT_PROFILE(
                           CL_CRM_UI_PROFILE_ROLE_CONFIG=>GC_PROFILE_ID ).
           endif.

  • How can I get system recovery discs (mailed and/or burned from laptop)?

    I have a family member who is in another state and has a Toshiba C855D-S5100. It is just under 1yr old and is having some issues booting up. She got it from Best Buy and took it to them yesterday. They are currently running a full diagnostic scan and will let us know what the problem is sometime today (virus, bad drive, bad memory, etc.).
    In the meantime, it made me think that we may want to create some recovery discs (if we can). I did this with an older Gateway. It required 4 DVDs. Can this be done with this model? If so, how as it has Windows 8 and I am not real familiar with this operating system just yet.
    If the test comes back and says the hard drive is the issue, the unit will be sent to Toshiba for repair (since there is 2 weeks left on warranty). In addition to trying to create some recovery discs, can we maybe somehow order the actual recovery discs from Toshiba directly (& keep for future purposes if the hard drive fails and gets replaced)? If so, how and where do we go to get these Toshiba recovery discs sent to us?

    The full Specifications for that machine are HERE.
    See the User's Guide starting on page 55 for instructions on "Creating Recovery Media" yourself.
    You can order Recovery Media from HERE. (Scroll down).
    C.B.
    Toshiba Sat. C75D-B7260 Win 8.1 64 Bit--Toshiba Sat. L775D-S7132 Win 7 HP SP1 64 Bit and Win 10 PRO Technical Preview--Toshiba Sat. L305-S5921 Win Vista SP2 32 Bit

  • How can I get System's Date and Convert it to a String?

    Hello there !
    I'm having a bit of a problem. Could anyone help me?
    I want to know how to get Today's Date in a String?
    Just the Date, and here's the trick.... in this precise Format:
    MM/dd/yyyy
    So for today my String should contain the value: "02/02/2007"
    Please help I am still a learner of the Java programming language.
    Thanks in advance

    And in Java 1.5+:System.out.printf("%1$tm/%1$td/%1$tY\n", new java.util.Date());:o)
    ~

  • I am trying to upload a pdf i created to an online system but am getting an error message indicating that my document is not formatted to 8.5x11. How can i get my document to 8.5x11

    I am trying to upload a pdf i created to an online system but am getting an error message indicating that my document is not formatted to 8.5x11. How can i get my document to 8.5x11

    You'll want to fix this via the online system you used to create the PDF.
    If all content mastering and page configuration is done online then that is where you must make a correction to what you did before.
    If a file is uploaded to the online system for processing then you must revisit that file.
    Open the file with its native application and correct page size there.
    If you upload a scanned image to the online system you must configure the scanner software to output the needed page size.
    Be well...

  • How can i get the System Time from the other host

    I want to get the System Time from the other host in the LAN,How can I get the Time using Java.
    Such as I am in WIN 2000 and I have a Unix host in LAN, I want to get unix host System time, How can I do it.

    Open a socket to port 13 and read a string with the time.
    -or-
    Open a socket to port 27 and read 4 bytes that are a network order timestamp
    Assuming that your UNIX machine has those services running, most do

  • How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    You can't.  iCloud is not for general file backup from a Mac. It's for backup up and syncing data between mobile devices and and Macs and  The following is from this Apple document: iCloud: Backup and restore overview.
    iCloud automatically backs up the most important data on your (mobile) device using iOS 5 or later. Once you have enabled Backup on your iPhone, iPad, or iPod touch .....
    What is backed up
    You get unlimited free storage for:
    Purchased music, movies, TV shows, apps, and books
    Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.
    Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
    You get 5 GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    Visual Voicemails
    But not from a Mac.  If you want to backup your photos and other important files I suggest you get an external hard drive and use  it with Time Machine.
    OT

  • My apple tv 2 says I can't stream music from my iTunes library on my iMac without settng up iTunes Match. I don't want to set up iTunes match. How can I get back to the pre-Match system which let me just use home sharing to stream music from computer to A

    When I click on the Music tab on my Apple TV 2, a message tells me I have to set up iTunes Match to stream music from my iTunes library on my iMac. I don't want to set up and pay for iTunes Match. How can I get back to the pre-Match system which let me just use home sharing to stream music from computer to Aple TV

    Ditto.
    You need to look for your itunes library under Computers and select it, then music.
    Music column is for web based content not local content, just to confuse everyone.
    AC

  • How can I get back to default in System pref/ displays/ color. iMac 10.9.5

    How can I get back to default in System pref/ displays/ color?  iMac 10.9.5

    Select the iMac option.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    A black airplay info window floats around on my HDTV screen when sending audio content via airplay up to sound system w Apple TV.  How can I get rid of this?

    Had this happen to me after a recent update, was super annoying.  To turn off, go to Settings > AirPlay > Conference Room Display > Off.

  • HT5219 How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    How can i get the Apple Thunderolt display to show Windows 7 i run on my system using Paralells desktop..

    You may need to set the slider at the upper-right corner of the Control window to something other than the extreme left-most position:
    Hope this helps.

Maybe you are looking for

  • I Can No Longer Connect Wirelessly With My iPad!

    About 2 days ago my iPad suddenly stopped connecting wirelessly to my BT HomeHub. I have deleted all of the networks available to me and reinstated them, I have carried out a full Restore of my iPad and I have switched all of my equipment off and bac

  • I want to test web pages in different browsers but my html pages saves as firefox document. I cant open this file in ie. how do I change this

    All files saved as html doc will save as firefox html doc which keeps me from opening this file in any other browser. This happens no matter which text editor I use. How do I save html docs without the firefox logo.

  • Controlled scrolling in Text area

    Hi Given a particular offset in Textarea.text, I want to scroll the Textarea instance to a vPosition where the word will be displayed. The height, width, fontsize, fonttype for the text area is fixed and it has only plain text associated with it. e.g

  • Windows EAP-TLS with machine cert only?

    Hey all. Seems like this should be an easy question, but after doing some reading, I'm still a little confused. Can I authenticate a windows computer against ISE using EAP-TLS with a computer-only certificate and stay authorized when the user logs in

  • Cant store Listbox.selecteditem in Variable

    Hi Everybody, im build a littl Powershell Programm, and thought everything was going well, but now i hit a wall. Im Trying to store the selected item of 3 Listboxes in 3 variables but it wont work. if i Close the form and look into listbox11.selected