jmod

How to extract the file jre-9/lib/modules?

[亡魂溺海] 提交于 2019-12-18 11:08:50
问题 In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jmod.exe , but that is for reading .jmod files which is located at jdk-9/jmods and it cannot read the file modules . 回答1: The modules file is a container file. It's internal to the JDK and the format is not documented (it may change at any time). For

Can I provide runtime compiler access when running with JRE in Java 9+?

牧云@^-^@ 提交于 2019-12-06 03:34:29
问题 I'm migrating an application to Java 10. Our application normally runs with the JRE, but we allow users to compile bits of their own custom code by bundling tools.jar and using reflection to load a JavacTool instance on demand. Our method looks like: public static JavaCompiler getJavaCompiler() { String toolJarName = "tools.jar"; File file = getResourceForClass("tools.jar"); try { file = file.getCanonicalFile(); } catch (IOException ignore) { } if (!file.exists()) throw new RuntimeException(

How to extract the file jre-9/lib/modules?

荒凉一梦 提交于 2019-11-30 02:01:42
In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jmod.exe , but that is for reading .jmod files which is located at jdk-9/jmods and it cannot read the file modules . The modules file is a container file. It's internal to the JDK and the format is not documented (it may change at any time). For troubleshooting purposes, the jimage tool in the bin directory can be used to list or extract the contents.