public class SystemPropertyDemo {
public static void main(String[]args){
String fileSeparator = System.getProperty("file.separator");
String classPath = System.getProperty("java.class.path");
String javaHome = System.getProperty("java.home");
String javaVendor = System.getProperty("java.vendor");
String javaVendorUrl = System.getProperty("java.vendor.url");
String javaVersion = System.getProperty("java.version");
String lineSeparator = System.getProperty("line.separator");
String osArch = System.getProperty("os.arch");
String osName = System.getProperty("os.name");
String osVersion = System.getProperty("os.version");
String pathSeparator = System.getProperty("path.separator");
String userDir = System.getProperty("user.dir");
String userHome = System.getProperty("user.home");
String userName = System.getProperty("user.name");
System.out.println(" fileSeparator: " + fileSeparator);
System.out.println(" classPath : " + classPath);
System.out.println(" javaHome : " + javaHome);
System.out.println(" javaVendor : " + javaVendor);
System.out.println(" javaVendorUrl : " + javaVendorUrl);
System.out.println(" javaVendorUrl : " + javaVersion);
System.out.println(" lineSeparator : " + lineSeparator);
System.out.println(" osArch : " + osArch);
System.out.println(" osName : " + osName);
System.out.println(" osVersion : " + osVersion);
System.out.println(" pathSeparator : " + pathSeparator);
System.out.println(" pathSeparator : " +userDir);
System.out.println(" userHome : " + userHome);
System.out.println(" userName : " + userName);
}
}
網頁
BloggerAds 廣告
標籤
- Java (96)
- Android (27)
- 演算法 (21)
- c++ (19)
- JavaScript (7)
- OpenMp (6)
- Design Pattern (4)
- 日文歌曲 (4)
- 資料結構 (4)
- Foundation Knowledge Of Programming (3)
- QUT (2)
- CodingHomeWork (1)
- Database (1)
- 英文歌詞 (1)
搜尋此網誌
2013年5月8日 星期三
讀取Java system properties (系統屬性)
訂閱:
文章 (Atom)
我的網誌清單
標籤
日文歌曲
(4)
股市
(7)
股票
(9)
英文歌詞
(1)
時事
(1)
硬體(hardware)
(1)
資料結構
(4)
演算法
(21)
數學(Math)
(4)
ACM
(3)
ajax
(7)
algorithms
(1)
Android
(27)
Blog Notes(部落格記事)
(6)
C
(9)
c++
(19)
CodingHomeWork
(1)
Database
(1)
Design Pattern
(4)
Foundation Knowledge Of Programming
(3)
GWT
(1)
How
(2)
J2EE
(1)
Java
(96)
Java語言
(4)
JavaScript
(7)
Leetcode
(4)
LOL
(1)
OpenMp
(6)
QUT
(2)
Uva
(2)
Yahoo知識問答
(11)