首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >到锡兰目录的Jimfs路径

到锡兰目录的Jimfs路径
EN

Stack Overflow用户
提问于 2016-02-11 23:05:39
回答 1查看 173关注 0票数 1

我试图在Jimfs文件系统中创建一个目录(使用锡兰的文件模块),但是当从锡兰访问文件系统时,我遇到了无法安装Jimfs提供程序的问题。

这是我的测试程序:

代码语言:javascript
复制
// File: test.se.gustavkarlsson.autogit.file.watcher.run

import ceylon.file {
    Nil,
    parseURI
}

import com.google.common.jimfs {
    Jimfs {
        jimFs=newFileSystem
    }
}

shared void run() {
    value fs = jimFs();
    value jPath = fs.getPath("directory");
    value uri = jPath.toUri().string;
    value path = parseURI(uri);
    value resource = path.resource;
    assert (is Nil resource);
    resource.createDirectory();
}

运行时,打印以下堆栈跟踪:

代码语言:javascript
复制
ceylon run: Provider "jimfs" not found
java.nio.file.ProviderNotFoundException: Provider "jimfs" not found
    at java.nio.file.FileSystems.newFileSystem(FileSystems.java:341)
    at java.nio.file.FileSystems.newFileSystem(FileSystems.java:276)
    at ceylon.file.internal.createSystem_.createSystem(ConcreteSystem.ceylon:64)
    at ceylon.file.createSystem_.createSystem(System.ceylon:43)
    at test.se.gustavkarlsson.autogit.file.watcher.run_.run(run.ceylon:17)
    at test.se.gustavkarlsson.autogit.file.watcher.run_.main(run.ceylon)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at ceylon.modules.api.runtime.SecurityActions.invokeRunInternal(SecurityActions.java:57)
    at ceylon.modules.api.runtime.SecurityActions.invokeRun(SecurityActions.java:48)
    at ceylon.modules.api.runtime.AbstractRuntime.invokeRun(AbstractRuntime.java:75)
    at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:122)
    at ceylon.modules.api.runtime.AbstractRuntime.execute(AbstractRuntime.java:106)
    at ceylon.modules.Main.execute(Main.java:69)
    at ceylon.modules.Main.main(Main.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.modules.Module.run(Module.java:312)
    at org.jboss.modules.Main.main(Main.java:460)
    at ceylon.modules.bootstrap.CeylonRunTool.run(CeylonRunTool.java:244)
    at com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:491)
    at com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:380)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:114)
    at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:41)
    at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:34)
    at com.redhat.ceylon.launcher.Launcher.main(Launcher.java:27)

对如何安装该提供者有什么想法吗?

我在Linux上运行Ceylon1.2.0,使用JimFs1.0(也测试了1.1-rc1),并以“有意”的方式(纯java nio)处理JimFs。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-12 12:41:30

这与模块的可见性有关,在该模块中,我们需要从JDK向jimFs模块添加一个"read“(使用Jigsaw术语)。

我开了https://github.com/ceylon/ceylon/issues/5995公司来调查。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35351848

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档