?
Solved

How to get system properties?

Posted on 2005-05-13
9
Medium Priority
?
176 Views
Last Modified: 2010-03-31
Can anyone show me how to do this?
I know how to display the java system properties and operating system name, version and the like, but is it possible to display cpu size, system memory, hdd size, etc.?

Regards
Aaron
0
Comment
Question by:aaronmcl
  • 5
  • 2
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 13995095
/**
 *  Description of the Class
 *
 * @author     CEHJ
 * @created    30 March 2004
 */
public class Props {

        /**
         *  The main program for the Props class
         *
         * @param  args  The command line arguments
         */
        public static void main(String[] args) {
                if (args.length > 0) {
                        for (int i = 0; i < args.length; i++) {
                                System.out.println(System.getProperty(args[0]));
                        }
                }
                else {
                        System.getProperties().list(System.out);
                }
        }
}
0
 

Author Comment

by:aaronmcl
ID: 13995121
Yeah, i know how to display those properties.
Is it possible to display cpu size, system memory, hdd size, etc.?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13995141
Not i don't think without JNI or some JNI wrapper
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:aaronmcl
ID: 13995173
I didnt think so.
Thanks anyway CEHJ
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13998152
OK
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13999440
I answered the question..?
0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 14023800
Question Closed, 50 points refunded.
PAQ_Man
Community Support Moderator
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 14025199
So i see my intervention was simply ignore by PAQ_Man
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question