|
-
February 24th, 2016, 02:02 PM
#9
Re: Implementing FileSystem without MANIFEST.MF/META-INF/services
 Originally Posted by Norm
I'm not sure how that would work. If the user doesn't tell the JVM about your URI, when and how would the JVM learn about it?
User in a sense of a client. There is a platform, providing services incl. instances of FileSystem through FileSystems factory methods (FileSystems.getFileSystem(URI)) and there are clients on top of that platform. All the client needs to know is a correct URI. The data is then supplied to the clients using instances of FileSystem.
The platform would somehow register my implementation of FileSystemProvider and FileSystem (plus the URI specs) with the JVM, so that users (clients) would then be able to obtain them through FileSystems.getFileSystem(URI). At first I thought that this could be done through ServiceLoader, but then I realized that ServiceLoader relies on META-INF/services (inside jars) and only loads what is specified there.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|