RFR: JDK-8212780: JEP 343: Packaging Tool Implementation (original) (raw)
Andy Herrick andy.herrick at oracle.com
Tue Nov 13 15:35:05 UTC 2018
- Previous message (by thread): RFR: JDK-8212780: JEP 343: Packaging Tool Implementation
- Next message (by thread): RFR: JDK-8212780: JEP 343: Packaging Tool Implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/13/2018 3:39 AM, Alan Bateman wrote:
On 12/11/2018 21:40, Philip Race wrote:
74 75 static String getTmpDir() { 76 String os = System.getProperty("os.name").toLowerCase(); 77 if (os.contains("win")) { 78 return System.getProperty("user.home") 79 + "\AppData\LocalLow\Sun\Java\JPackager\tmp"; 80 } else if (os.contains("mac") || os.contains("os x")) { 81 return System.getProperty("user.home") 82 + "/Library/Application Support/Oracle/Java/JPackager/tmp"; 83 } else if (os.contains("nix") || os.contains("nux") 84 || os.contains("aix")) { 85 return System.getProperty("user.home") + "/.java/jpackager/tmp"; 86 } 87 88 return System.getProperty("java.io.tmpdir");
This seems unduly complex, and I don't understand the implication of supporting AIX .. or some unknown "Unix", when packager is targeted only at mac, linux + windows. user.home is specified to be the user's home directory so I would think it should use that consistently everywhere. I assume "Sun" and "Oracle" can be dropped from the file location too.
Agreed - the resulting paths will all start with System.getProperty("user.home") and the "Sun" and "Oracle" sub-directories will be removed both here and in the matching native launcher code. Added that to JDK-8213756 <https://bugs.openjdk.java.net/browse/JDK-8213756>
/Andy
-Alan
- Previous message (by thread): RFR: JDK-8212780: JEP 343: Packaging Tool Implementation
- Next message (by thread): RFR: JDK-8212780: JEP 343: Packaging Tool Implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]