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.