Java is used to obtain system information. java is used to obtain system information.

Source: Internet
Author: User

Java is used to obtain system information. java is used to obtain system information.

Use java to obtain the following information:

Host Name:

OS Name:
OS version:

OS manufacturer:

OS Configuration:

Independent Workstation
OS component type:

Registered Owner:

Registered Organizations:

Product ID:
Initial installation date:

System start time:

System manufacturer:
System Model:

System type:

Processor:
BIOS version:

Windows directory:

System directory:

Start the device:

System region settings:

Input Method region settings:
Time zone:

Total physical memory:

Available physical memory: virtual memory:

Maximum Value: virtual memory:

Available: virtual memory:

Active: 4,442 MB
Page file location:

Domain:

Login Server:

Patch:
NIC:

 

1 import java. io. IOException; 2 public class testCase {3 4 public static void main (String [] args) {5 6/** 7 * cmd space/k space systeminfo: run the command specified by the string but keep it 8*9 * systeminfo: view system information 10 */11 try {12 runtime.getruntime(cmd.exe c ("cmd/k systeminfo> d:/xx.txt "); 13 System. out. println ("execution completed! "); 14} catch (IOException e) {15 System. out. println (" An error occurred while generating the file! "); 16 e. printStackTrace (); 17} 18} 19}


To the dashboard upload xx.txt file.

You can see:

 

 

 

Author: daliu_it
Blog Source: http://www.cnblogs.com/liuhongfeng/p/4184805.html

 

The copyright of this article is shared by the author and the blog, but the above statement must be retained and placed on the article page without the author's consent. Thank you for your cooperation.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.