You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
http://stackoverflow.com/questions/35351848/jimfs-path-to-ceylon-directory shows that we need to be able to add a module import to the JDK. In this case FileSystems uses the system class loader to load file-system providers via the JDK service API, but it does not find the jimfs module because it doesn't "see" it.
Although we can create a FileSystem by giving a ClassLoader, which is how this jimFs gets created, the ceylon.file uses URI Paths.get(String) which does not allow us to specify the ClassLoader and so we're left with having to make this provider visible to the JDK.
This is tricky for JBoss modules because I don't think we have influence over the system ClassLoader. This is differently tricky for the --flat-classpath option because the JDK is not in the URLClassLoader that flatly contains all the Ceylon modules.
We have to check how Jigsaw handles this issue as they'll have the exact same problem.
The text was updated successfully, but these errors were encountered:
Easiest short-term answer would probably be to stuff the java.nio.file.spi.FileSystemProvider#installedProviders field with a new list of providers which includes the one(s) you want to add.
I can see a way to enhance JBoss Modules to support pluggable filesystem providers in the same manner that it supports pluggable URL handlers and etc. If you're interested in having this done, please file a JIRA into the JBoss Modules project.
It sounds like the problem is very related to what in Jigsaw would be solved by adding "reads" from the JDK module to the provider module. FileSystem use the Java services pattern, so any solution that solves providing the JDK with access to services (and the related ClassLoader I think) would be generic and solve many issues. If you don't have something like that yet, I'll file an issue.
http://stackoverflow.com/questions/35351848/jimfs-path-to-ceylon-directory shows that we need to be able to add a module import to the JDK. In this case
FileSystems
uses the system class loader to load file-system providers via the JDK service API, but it does not find the jimfs module because it doesn't "see" it.Although we can create a
FileSystem
by giving aClassLoader
, which is how this jimFs gets created, theceylon.file
usesURI Paths.get(String)
which does not allow us to specify theClassLoader
and so we're left with having to make this provider visible to the JDK.This is tricky for JBoss modules because I don't think we have influence over the system ClassLoader. This is differently tricky for the
--flat-classpath
option because the JDK is not in theURLClassLoader
that flatly contains all the Ceylon modules.We have to check how Jigsaw handles this issue as they'll have the exact same problem.
The text was updated successfully, but these errors were encountered: