Add modulepath support for Java >= 9
See original GitHub issueKtor application can’t be compiled with JDK >=9. I’m getting a lot of such errors:
error: module kotlinx.io.jvm reads package io.ktor.http from both ktor.server.core and ktor.http.jvm
error: module kotlinx.io.jvm reads package io.ktor.http.content from both ktor.server.core and ktor.http.jvm
error: module kotlinx.io.jvm reads package io.ktor.util from both ktor.server.core and ktor.utils.jvm
error: module kotlinx.coroutines.jdk8 reads package io.ktor.http from both ktor.server.core and ktor.http.jvm
error: module kotlinx.coroutines.jdk8 reads package io.ktor.http.content from both ktor.server.core and ktor.http.jvm
error: module kotlinx.coroutines.jdk8 reads package io.ktor.util from both ktor.server.core and ktor.utils.jvm
error: module kotlinx.coroutines.core reads package io.ktor.http from both ktor.server.core and ktor.http.jvm
error: module kotlinx.coroutines.core reads package io.ktor.http.content from both ktor.server.core and ktor.http.jvm
error: module kotlinx.coroutines.core reads package io.ktor.util from both ktor.server.core and ktor.utils.jvm
...................
Support of Java 8 ends quite soon, so it makes sense to start supporting Jigsaw. IMHO, this should be prioritized, as it will require breaking backward compatibility. The less Ktor is popular, the easier would be to break backward compatibility. And Ktor will definitely become more popular over time.
Ktor Version
1.2.0
JVM Version, Operating System and Relevant Context
JDK 12
Issue Analytics
- State:
- Created 4 years ago
- Reactions:31
- Comments:24 (6 by maintainers)
Top Results From Across the Web
A Guide to Java 9 Modularity - Baeldung
Learn the essentials of building and using modules in Java 9. Start down the path of modularizing your code today.
Read more >java - Oracle Help Center
Used only with the -jar option. modulepath. Specifies the path to a semicolon-separated (;) list of directories in which each directory is a...
Read more >Is it possible to mix --class-path and --module-path in javac ...
You can use class path and module path in parallel, but there are a few details to consider. Dependency Module Path ~> Class...
Read more >Java Module System (JDK 9)
A CLASSPATH is a sequence of classes' base paths and JAR files for the Java Compiler or JVM to locate the classes used...
Read more >How in Eclipse project module java-9 have modulepath and ...
It would help my understanding though if you first please explain why you need to „assign to this container library entries“. Aside from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is surely a critical issue to solve; with Ktor being such a new and forward looking framework and others trying to create similarly forward looking libraries and Applications that reference it - we can’t afford to be stuck in Java 8 land any more.
Ktor is already well modularised by artifact; that just needs to be formalised for Java, with a Java Module per Ktor module. There will have to be a brief ‘breaking’ pain of renaming the packages-per-module - but considering the number of dependents on Ktor is set to grow fast - the sooner the better!
Fixed with
2.0.0