java.lang.NoClassDefFoundError

com/sun/net/httpserver/HttpHandler

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web137

  • via Stack Overflow by CodeYogi
    ,
  • via Unknown by Mac Dcosta,
  • via GitHub by yangzp138
    ,
  • Stack trace

    • java.lang.NoClassDefFoundError: com/sun
    • et/httpserver/HttpHandler at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194) at org.apache.tools.ant.taskdefs.Java.run(Java.java:771) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1248) at org.apache.tools.ant.Main.runBuild(Main.java:851) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.lang.NoClassDefFoundError: com/sun
    • et/httpserver/HttpHandler at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:344) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:135) ... 21 more Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.HttpHandler at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1374) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1323) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1082) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 24 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor3 times, last one