Multi-Release-War for tomcat8 on jdk10

180 Views Asked by At

I just read about Multi-Release-Jars what looks like a good advantage. I can not get it working using a Tomcat8 on JDK10 and not getting a stacktrace.

This is my servlet (placed at webapp.jar!/META-INF/versions/10/de/NanoNanoServlet.class):

package de;
public class NanoNanoServlet extends HttpServlet {
  @SuppressWarnings("deprecation")
  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
      System.out.println("10");
  }
}

This is my servlet (placed at webapp.jar!/de/NanoNanoServlet.class):

package de;
public class NanoNanoServlet extends HttpServlet {
  @SuppressWarnings("deprecation")
  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
      System.out.println("Other");
  }
}

What I get is the console-output:

Other

But it must be

10

Using a Tomcat on JDK10

0

There are 0 best solutions below