[9] RFR 8170113: jimage extract to readonly directory causes MissingResourceException

Alan Bateman Alan.Bateman at oracle.com
Mon Feb 6 10:37:29 UTC 2017

(cc'ing jigsaw-dev as that is where the jimage tool is maintained).

On 06/02/2017 10:27, Denis Kononenko wrote:
> Hi,
> Could someone please review this very small fix.
> The class JImageTask (src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java) has references to an info message by 'err.cannot.create.dir' key. Unfortunately the corresponding resource file (src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties) doesn't contain this key. This results in long not user friendly stacktraces in output when jimage cannot create a directory. The fix is very small, I added the missing definition into the resource file.
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8170113
> WEBREV: http://cr.openjdk.java.net/~dkononenko/8170113/webrev.00
This looks okay as a short term fix but I think that extract need to 
be-implemented to use the new file system API so that the reasons why 
the directory can be printed too. Also there is an anomaly in errors 
related to the directory result in an error message whereas any errors 
extracting to the directory lead to an exception.


More information about the core-libs-dev mailing list