Results 1 to 2 of 2
  1. #1
    frx08 is offline Member
    Join Date
    Jan 2011
    Rep Power

    Default problem with finding imported classes

    Hi all, I have my class that uses the library;
    so when I compile my class I use this command
    javac -cp commons-net-2.2.jar
    (the folder contains, commons-net-2.2.jar, index.html)
    So I compile without errors..
    but when I put the applet in index.html (<applet code="MyClass.class"></applet>)

    and I try to run the applet I get this console error:
    Java Code:
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    	at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    	at sun.plugin2.applet.Plugin2Manager$ Source)
    	at Source)
    why, I can I solve it?

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Rep Power


    You need read this topic
    How to Make Applets (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components).
    You need to set all library, which you use in applet.
    For example:
    <applet code="TumbleItem.class"
    archive="tumbleClasses.jar, tumbleImages.jar"
    width="600" height="95">
    Skype: petrarsentev

Similar Threads

  1. Default imported packages
    By Himanshu23 in forum Java Software
    Replies: 2
    Last Post: 01-11-2011, 07:20 AM
  2. how can downloaded package be imported in java
    By aldm in forum New To Java
    Replies: 3
    Last Post: 10-08-2010, 11:16 AM
  3. show the comment in the imported class
    By javastuden in forum New To Java
    Replies: 5
    Last Post: 08-31-2010, 11:37 AM
  4. Is the imported package foo beeing used in the programm
    By cthulhufhtagn in forum New To Java
    Replies: 3
    Last Post: 11-01-2009, 05:27 PM
  5. Problem with finding the max element
    By SMHouston in forum New To Java
    Replies: 39
    Last Post: 09-13-2009, 11:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts