RFR: JDK-8212780: JEP 343: Packaging Tool Implementation
Alan Bateman
Alan.Bateman at oracle.com
Tue Nov 13 08:39:17 UTC 2018
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.
-Alan
More information about the build-dev
mailing list