Package org.apache.bcel.util
Class ModularRuntimeImage
java.lang.Object
org.apache.bcel.util.ModularRuntimeImage
- All Implemented Interfaces:
Closeable
,AutoCloseable
Wraps a Java 9 JEP 220 modular runtime image. Requires the JRT NIO file system.
- Since:
- 6.3
-
Constructor Summary
ConstructorDescriptionConstructs a default instance.ModularRuntimeImage
(String javaHome) Constructs an instance using the JRT file system implementation from a specific Java Home. -
Method Summary
-
Constructor Details
-
ModularRuntimeImage
Constructs a default instance.- Throws:
IOException
- an I/O error occurs accessing the file system
-
ModularRuntimeImage
Constructs an instance using the JRT file system implementation from a specific Java Home.- Parameters:
javaHome
- Path to a Java 9 or greater home.- Throws:
IOException
- an I/O error occurs accessing the file system
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
list
Lists all entries in the given directory.- Parameters:
dirPath
- directory path.- Returns:
- a list of dir entries if an I/O error occurs
- Throws:
IOException
- an I/O error occurs accessing the file system
-
list
Lists all entries in the given directory.- Parameters:
dirName
- directory path.- Returns:
- a list of dir entries if an I/O error occurs
- Throws:
IOException
- an I/O error occurs accessing the file system
-
modules
Lists all modules.- Returns:
- a list of modules
- Throws:
IOException
- an I/O error occurs accessing the file system
-
packages
Lists all packages.- Returns:
- a list of modules
- Throws:
IOException
- an I/O error occurs accessing the file system
-
getFileSystem
-