当使用Undertow 1.4.20(作为嵌入式Servlet引擎)时,我在Java 9下运行应用程序时遇到了这个异常
java.lang.ClassNotFoundException: sun.misc.Cleaner
原因是这条线在
io.undertow.server.DirectByteBufferDeallocator
:
tmpCleanerClean = Class.forName("sun.misc.Cleaner").getMethod("clean");
这个类在Java 9中确实不再存在了。但可以替换:
java.lang.ref.Cleaner
我现在可以忽略这个例外吗?是否有解决此问题的时间表(即使undertow Java 9兼容)?