http://www.java2s.com/Code/Java/Database-SQL-JDBC/DemoPreparedStatementSetNullforintvaluecolumn.htm
String SLASH = System.getProperty("file.separator");
String BACK_DIR = SLASH + ".."+SLASH;
String DIR = System.getProperty("user.dir");
String confPath = DIR+BACK_DIR+"webapps"+SLASH+"conf"+SLASH+"ManualUpdate.conf" ;
System.out.println(confPath + " " + System.getProperty("user.dir"));
Properties p = System.getProperties();
p.list(System.out);
The following table describes some of the most important system properties
| Key |
Meaning |
"file.separator" |
Character that separates components of a file path. This is "/" on UNIX and "\" on Windows. |
"java.class.path" |
Path used to find directories and JAR archives containing class files. Elements of the class path are separated by a platform-specific character specified in the path.separator property. |
"java.home" |
Installation directory for Java Runtime Environment (JRE) |
"java.vendor" |
JRE vendor name |
"java.vendor.url" |
JRE vendor URL |
"java.version" |
JRE version number |
"line.separator" |
Sequence used by operating system to separate lines in text files |
"os.arch" |
Operating system architecture |
"os.name" |
Operating system name |
"os.version" |
Operating system version |
"path.separator" |
Path separator character used in java.class.path |
"user.dir" |
User working directory |
"user.home" |
User home directory |
"user.name" |
User account name |
Security consideration: Access to system properties can be restricted by the
Security Manager. This is most often an issue in applets, which a