KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The java.lang.System class defines a number of well-known properties . For example, you can obtain the JVM's temporary directory by looking up the "java.io.tmpdir" property: ... = System.getProperty("java.io.tmpdir"); What I don't understand is why these properties aren't defined as constants (e.g. in the java.lang.System class). This would be a lot less error-prone than using literal Strings. In other words, I would like to be able to do this: ... = System.getProperty(System.JAVA_IO_TMPDIR); Any ideas why this wasn't done? It could even be added in a future release of Java without breaking backward compatibility. Or am I missing something obvious?
Tags (comma-separated)
Save Edits
Cancel