Zulu Community

Using suns HttpServer class in with zulu

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

Hi,

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 8.25.0.76-linux-aarch32hf it says “java.lang.NoClassDefFoundError”

Is there a way to make it possible ?

  • Liked by
Reply
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
Reply
Cancel