From c7668547e7914a8bfd0a10f4cbd6db19828c35e5 Mon Sep 17 00:00:00 2001 From: Romain Grecourt Date: Thu, 31 Oct 2024 09:19:00 -0700 Subject: [PATCH] Fix CDS archiveFile.setWritable (#1082) Use jri.resolve(archiveFile), as archiveFile is a path relative to the JRI directory. Fixes #1078 --- .../main/java/io/helidon/build/linker/ClassDataSharing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linker/src/main/java/io/helidon/build/linker/ClassDataSharing.java b/linker/src/main/java/io/helidon/build/linker/ClassDataSharing.java index 3eb366a5e..9e71a720f 100644 --- a/linker/src/main/java/io/helidon/build/linker/ClassDataSharing.java +++ b/linker/src/main/java/io/helidon/build/linker/ClassDataSharing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022 Oracle and/or its affiliates. + * Copyright (c) 2019, 2024 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -365,7 +365,7 @@ private void buildCdsArchive() throws Exception { } if (Constants.OS == OSType.Windows) { // Try to make the archive file writable so that a second run can delete the image - archiveFile.toFile().setWritable(true); + jri.resolve(archiveFile).toFile().setWritable(true); } }