Java 9 has three ways to package compiled code in files: JAR JMOD JIMAGE JIMAGE is optimized for speed and space and used by the JVM at runtime so it makes sense why JIMAGE was introduced. JIMAGE files are not supposed to be published to maven repos or used at compile or link time. The docs claim that JMOD can
Tag: java-9
Error:java: invalid flag: -release
I use Java : and IntelliJ IDEA: Get error when compiling: Executing javac -help : So javac should use two hyphens with release, but Intellij Idea use with one. Can I override javac options that IDEA use or fix it in some way? UPD: Even Build, Execution, Deployment > Compiler > Java Compiler Additional Command Line Parameter doesn’t help in
List.of() or Collections.emptyList()
As an special case of List.of(…) or Collections.unmodifiableList() – what is the preferred Java 9 way of pointing to an empty and immutable list? Keep writing or switch to Answer What is the preferred Java 9 way of pointing to an empty and immutable list? The difference is rather subtle so “preferred” depends on what you want to achieve. Some
How to properly close MappedByteBuffer?
This is the code I’m running: Before pressing a key, I’m trying to delete the file manually in FAR Manager. But FAR says that the file is locked: Only after pressing a key, the application terminates and I can delete the file. What is wrong with my code? Answer Try this one.