Skip to content

Cannot resolve FileSystem root resource in Native Image #5020

@bclozel

Description

@bclozel

Describe the issue
When adding resources to the native image, the native image FileSystemProvider is used to resolve resources at runtime. The root directory of this file system is not available; this prevents applications from listing all available resources in the application.
This is being extracted from #1108, which conflates several issues.

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. git clone git@github.com:bclozel/native-resources.git
  2. ./gradlew nativeCompile

Describe GraalVM and your environment:

java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)
  • CE 22.2.0
  • JDK major version: 17
  • OS: macOS Monterey
  • Architecture: AMD64

The repo README explains how to reproduce the behavior step by step.

Please tag this issue with the "Spring" tag.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions