Zulu Community

Using suns HttpServer class in with zulu

Updated on March 26, 2018 in Zulu on Linux
1 on January 6, 2018


I’d like to use the “com.sun.net.httpserver” in my java project. It runs perfectly fine in other jdks.

Normally in OpenJDK it’s available but unfortunately with Zulu Embedded it says “java.lang.NoClassDefFoundError”

Is there a way to make it possible ?

  • Liked by
0 on March 26, 2018

“com.sun.net.httpserver” is a non-public deprecated class. It was never a public API and was intended to be used by applications directly. Sorry, you need to remove this dependency and limit yourself to the Java API to be safe with the “write once, run everywhere” paradigm.
We recommend “jetty”, an Apache project HTTP Server implementation.

  • Liked by