java.lang.NoClassDefFoundError:


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: java.lang.NoClassDefFoundError:

  1. #1
    Join Date
    Dec 2002
    Posts
    1

    Question java.lang.NoClassDefFoundError:

    HI,

    When I try to import a class file from in this case.

    import javax.servlet.http.*;
    // Cookie class to to be exact

    the compiler does fine no errors, but when i try to run the applet i get

    java.lang.NoClassDefFoundError: javax/servlet/http/Cookie


    what am I doing wrong..

    Charles..

  2. #2
    Join Date
    Mar 2003
    Posts
    17
    you probably need to have the javax.jar added your classpath.

    It may not come with the J2SE download, you may need to get the J2EE download, and it will most likely be in the lib directory. You just need to edit the classpath to include it (dont forget, the directory is not enough with jars, they need to be done explicitly as tho they were directories themselves).
    Laziness is a virtue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center