Hi, I have downloaded the commons-net-1.4.0.jar archive as I need to be able to ftp to a remote host from within my java program. However upon trying to compile my source code I get the error message :
C:\FTPTesting\getDataFiles.java:1: package org.apache.commons.net.ftp does not exist import org.apache.commons.net.ftp.*;
I presume this is related to me not setting the classpath correctly but I have little understanding of how this should be set and what exactly it does.
My specific questions are then.
1> Where do I copy the commons-net-1.4.0.jar file to on my C: drive, is there a specific loction where it needs to be ?.
2> My source code is in the Directory C:\FTPTesting and I am compling it from this directory also, how do i set the classpath so that it can always find the commons-net-1.4.0 library and what command do i use to set it up ?
RE: #2 - To make the classpath setting permanent, you need to modify your environment variables. Go into Control Panel, double-click System, click the Advanced tab, then the Environment Variables button. Edit the variable CLASSPATH (or add it if it doesn't exist) and append ";C:\path\to\commons-net-1.4.0.jar" to the current value.
I don't always make ads but when I do they're tiny