Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: External libraries

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default External libraries

    Hi all forum members...this is my first post here so be gentle..

    I'm new into java so i'm experimenting new stuff
    I have problem with importing external libraries
    I have downloaded jar file from apache commons site and done everything that is need to be done
    I imported classpath in windows, I updated build path in Eclipse(added external jar) but this still doesn't work

    The method connect(String) is undefined for the type FTPClient...it seems like Eclipse cannot read methods(same problem with methods disconnect, getReplyString, getReplyCode

    import org.apache.commons.net.ftp.*;
     
    public class FTPClient {
     
    	public static void main(String[] args) {
     
                           FTPClient ftpClient = new FTPClient();
     
    		try {
    			int reply;
     
    			ftpClient.connect("ftp.nesto.com");
    			   System.out.print(ftpClient.getReplyString());
     
    			      reply = ftpClient.getReplyCode();
     
    			      if(!FTPReply.isPositiveCompletion(reply)) {
    			        ftpClient.disconnect();
    			        System.err.println("FTP server refused connection.");
    			        System.exit(1);
    			      }
     
    		}catch (IOException ex) {
    			System.out.println("Error: " + ex.getMessage());
    			ex.printStackTrace();
     
    		}
    		}
     
    	}

    What am I doing wrong?
    Thanks in advance


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: External libraries

    Moved this question to the IDE section.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: External libraries

    Have you tried compiling it with a different IDE ?

Similar Threads

  1. Using C Libraries in Java Project
    By x34 in forum Java Native Interface
    Replies: 1
    Last Post: September 25th, 2012, 02:01 PM
  2. Question about project libraries
    By xMKx in forum Java Theory & Questions
    Replies: 0
    Last Post: August 12th, 2012, 11:33 PM
  3. Java Crypto Libraries
    By bidemiokus in forum Java Theory & Questions
    Replies: 1
    Last Post: April 14th, 2012, 05:37 AM
  4. Zipping External Libraries With Jar
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: March 31st, 2011, 08:49 PM