| System.getProperty("path.separator"); |
| |
| System.getProperty("file.separator"); |
| |
| System.getProperty("line.separator"); |
| |
| void dumpAllProperties() { |
| java.util.Enumeration enumeration = System.getProperties().keys(); |
| String key = null; |
| while (enumeration.hasMoreElements()) { |
| key = (String) enumeration.nextElement(); |
| System.out.print(key); |
| for (int i = 0; i < (30 - key.length()); i++) |
| System.out.print(" "); |
| System.out.println("->" + System.getProperty(key)); |
| } |
| } |
| |
| |
| |
| "test.xml.package.xml".replaceAll(".xml$", ".html"); |
| |
| |
| String a = (true ? ".jar" : ".jar,unpack=true"); |
| System.out.println(a); |
| |
| |
| String trackedArtifacts = "one,two,three four:five"; |
| String[] trackedStringsArray = null; |
| if (trackedArtifacts != null) { |
| trackedStringsArray = trackedArtifacts.split("[,;: ]"); |
| } |
| for (int i = 0; i < trackedStringsArray.length; i++) { |
| System.out.println(trackedStringsArray[i]); |
| } |
| |
| |