[10] Review request: 8179033: javapackager fails to create Mac Application Bundle
Kevin Rushforth
kevin.rushforth at oracle.com
Sat Dec 2 14:31:14 UTC 2017
Michael Hall wrote:
>
>> On Dec 1, 2017, at 7:43 PM, victor.drozdov at oracle.com
>> <mailto:victor.drozdov at oracle.com> wrote:
>>
>> Kevin,
>>
>> Please review the changes about copying classpath entries on Mac and
>> Windows.
>>
>> JIRA: https://bugs.openjdk.java.net/browse/JDK-8179033
>> Webrev: http://cr.openjdk.java.net/~vdrozdov/JDK-8179033/webrev.00/
>> <http://cr.openjdk.java.net/%7Evdrozdov/JDK-8179033/webrev.00/>
>
> Sorry, to comment on this when it is not my place.
> But I had looked at this sometime ago and it made no sense.
> For the Mac you have…
>
> - Files.copy(new File(srcdir, fname).toPath(), new
> File(javaDirectory.toFile(), fname).toPath());
> + writeEntry(new FileInputStream(new File(srcdir, fname)),
> + new File(javaDirectory.toFile(),
> fname).toPath());
>
> What is the difference here? You are just changing the method of
> writing the file. Otherwise locations are identical.
> Assuming the first way isn’t working, why would the second way do better?
>
writeEntry creates the directory before copying (and also opens the file
using an InputStream, but its the former that is the main part of the fix).
-- Kevin
More information about the openjfx-dev
mailing list