Results 1 to 10 of 10

Thread: import problem

  1. #1
    anki.gulsvart is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default import problem

    Hi.
    Im trying to connect to an ftp-server with java.
    Ive been looking at a lot of examples, and in all of them they use:

    import org.apache.commons.net.ftp.FTPClient;
    But when i compile it i get the error:

    package org.apache.commons.net.ftp.FTP does not exist

    Any idea someone?

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

    Default

    Those packages are not part of standard Java.
    You'd have to download them from apache.

  3. #3
    anki.gulsvart is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    Thanks.
    But i cant find it on their website thought.

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

  5. #5
    anki.gulsvart is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    downloaded it but can still not run the program.

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

    Default

    Because of the same error? Did you add the required jars to the classpath when compiling and running?

  7. #7
    anki.gulsvart is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    Yes same error.
    No i didnt. Im pretty new to this. How do i do that?

  8. #8
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

    Default

    Read this page.
    Actually you might find it worth while to spend time reading these basics tutorials before trying to write ftp programs.

  9. #9
    anki.gulsvart is offline Member
    Join Date
    Oct 2009
    Posts
    17
    Rep Power
    0

    Default

    Ive read it and tried to search on google.
    And ive tried to write

    C:\Users\Anna>set CLASSPATH=C:\Users\Anna\Documents\JCreator LE\MyProjects\commo
    ns-net-2.0\commons-net-ftp-2.0.jar

    in my commandprompt and tried to do it in JCreator, but i cant make it work.
    What am i doing wrong?

  10. #10
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    10

Similar Threads

  1. Replies: 6
    Last Post: 09-11-2009, 12:34 AM
  2. Eclipse "import not resolved" package problem?
    By spamsickle in forum New To Java
    Replies: 3
    Last Post: 08-24-2009, 11:44 AM
  3. Import java.io.* problem
    By DD70 in forum New To Java
    Replies: 3
    Last Post: 07-28-2009, 10:45 PM
  4. [SOLVED] import netscape.javascript.* problem
    By shwein in forum New To Java
    Replies: 2
    Last Post: 10-30-2008, 07:43 PM
  5. Simple newbie problem: import 3rd party jar
    By jodyflorian in forum Eclipse
    Replies: 5
    Last Post: 05-30-2008, 04:02 AM

Posting Permissions

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