jjzjj

FileSystemNotFoundException

全部标签

javascript - 在 Springboot 中初始化 Graal 时出现 FileSystemNotFoundException

我在我的项目中添加了graal库以在Java中执行JavaScript。我的项目在spingboot框架上工作。compilegroup:'org.graalvm.sdk',name:'graal-sdk',version:'1.0.0-rc9'compilegroup:'org.graalvm.js',name:'js',version:'1.0.0-rc9'compilegroup:'org.graalvm.js',name:'js-scriptengine',version:'1.0.0-rc9'compilegroup:'org.graalvm.tools',name:'pro

从资源文件夹获取文件时出现 java.nio.file.FileSystemNotFoundException

我在以下代码中遇到此错误(请注意,这不会发生在我的本地机器上,只会发生在我的构建服务器上):Files.readAllBytes(Paths.get(getClass().getResource("/elasticsearch/segmentsIndex.json").toURI()),Charset.defaultCharset());异常(exception)情况:Causedby:java.nio.file.FileSystemNotFoundException:nullatcom.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem

java - 创建资源路径时从 ZipFileSystemProvider 获取 FileSystemNotFoundException

我有一个Maven项目,在一个方法中,我想在我的资源文件夹中创建一个目录的路径。这样做是这样的:try{finalURIuri=getClass().getResource("/my-folder").toURI();PathmyFolderPath=Paths.get(uri);}catch(finalURISyntaxExceptione){...}生成的URI看起来像jar:file:/C:/path/to/my/project.jar!/my-folder。堆栈跟踪如下:Exceptioninthread"pool-4-thread-1"java.nio.file.FileSy

java - 创建资源路径时从 ZipFileSystemProvider 获取 FileSystemNotFoundException

我有一个Maven项目,在一个方法中,我想在我的资源文件夹中创建一个目录的路径。这样做是这样的:try{finalURIuri=getClass().getResource("/my-folder").toURI();PathmyFolderPath=Paths.get(uri);}catch(finalURISyntaxExceptione){...}生成的URI看起来像jar:file:/C:/path/to/my/project.jar!/my-folder。堆栈跟踪如下:Exceptioninthread"pool-4-thread-1"java.nio.file.FileSy

jar 中的 Java 访问文件导致 java.nio.file.FileSystemNotFoundException

在尝试使用我的java应用程序将我的jar文件中的一些文件复制到临时目录时,抛出以下异常:java.nio.file.FileSystemNotFoundExceptionatcom.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171)atcom.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157)atjava.nio.file.Paths.get(UnknownSource)at