Hello *,

We've built an application using apache commons net. When built inside NetBeans for testing our changes it works fine. However, we would like to now create a stand alone .jar for execution on various hosts. However, we receive the following:

SubnetUtilsTest.java:23: package junit.framework does not exist
import junit.framework.TestCase;
^
SubnetUtilsTest.java:25: cannot find symbol
symbol: class TestCase
public class SubnetUtilsTest extends TestCase {
^
FTPClientConfigFunctionalTest.java:25: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPClientConfigFunctionalTest.java:50: cannot find symbol
symbol: class TestCase
public class FTPClientConfigFunctionalTest extends TestCase {
^
FTPClientConfigTest.java:25: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPClientConfigTest.java:27: cannot find symbol
symbol: class TestCase
public class FTPClientConfigTest extends TestCase {
^
FTPCommandTest.java:21: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPCommandTest.java:23: cannot find symbol
symbol: class TestCase
public class FTPCommandTest extends TestCase {
^
ListingFunctionalTest.java:24: package junit.framework does not exist
import junit.framework.Test;
^
ListingFunctionalTest.java:25: package junit.framework does not exist
import junit.framework.TestCase;
^
ListingFunctionalTest.java:26: package junit.framework does not exist
import junit.framework.TestSuite;
^
ListingFunctionalTest.java:33: cannot find symbol
symbol: class TestCase
public class ListingFunctionalTest extends TestCase
^
ListingFunctionalTest.java:43: cannot find symbol
symbol : class Test
location: class org.apache.commons.net.ftp.ListingFunctionalTest
public static final Test suite()
^
TestConnectTimeout.java:24: package junit.framework does not exist
import junit.framework.TestCase;
^
TestConnectTimeout.java:31: cannot find symbol
symbol: class TestCase
public class TestConnectTimeout extends TestCase {
^
FTPParseTestFramework.java:18: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPParseTestFramework.java:29: cannot find symbol
symbol: class TestCase
public abstract class FTPParseTestFramework extends TestCase
^
DefaultFTPFileEntryParserFactoryTest.java:18: package junit.framework does not exist
import junit.framework.TestCase;
^
DefaultFTPFileEntryParserFactoryTest.java:24: cannot find symbol
symbol: class TestCase
public class DefaultFTPFileEntryParserFactoryTest extends TestCase
^
FTPConfigEntryParserTest.java:22: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPConfigEntryParserTest.java:36: cannot find symbol
symbol: class TestCase
public class FTPConfigEntryParserTest extends TestCase {
^
FTPTimestampParserImplTest.java:30: package junit.framework does not exist
import junit.framework.AssertionFailedError;
^
FTPTimestampParserImplTest.java:31: package junit.framework does not exist
import junit.framework.TestCase;
^
FTPTimestampParserImplTest.java:39: cannot find symbol
symbol: class TestCase
public class FTPTimestampParserImplTest extends TestCase {
^
MLSDComparison.java:37: package org.junit does not exist
import org.junit.Test;
^
IMAPTest.java:21: package junit.framework does not exist
import junit.framework.Assert;
^
IMAPTest.java:23: package org.junit does not exist
import org.junit.Test;
^
DotTerminatedMessageReaderTest.java:23: package junit.framework does not exist
import junit.framework.TestCase;
^
DotTerminatedMessageReaderTest.java:25: cannot find symbol
symbol: class TestCase
public class DotTerminatedMessageReaderTest extends TestCase {
^
TimeStampTest.java:21: package junit.framework does not exist
import junit.framework.TestCase;
^
TimeStampTest.java:29: cannot find symbol
symbol: class TestCase
public class TimeStampTest extends TestCase {
^
POP3ClientCommandsTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
POP3ClientCommandsTest.java:43: cannot find symbol
symbol: class TestCase
public class POP3ClientCommandsTest extends TestCase
^
POP3ClientTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
POP3ClientTest.java:43: cannot find symbol
symbol: class TestCase
public class POP3ClientTest extends TestCase
^
POP3ConstructorTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
POP3ConstructorTest.java:40: cannot find symbol
symbol: class TestCase
public class POP3ConstructorTest extends TestCase
^
TelnetOptionHandlerTestAbstract.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
TelnetOptionHandlerTestAbstract.java:30: cannot find symbol
symbol: class TestCase
public abstract class TelnetOptionHandlerTestAbstract extends TestCase
^
InvalidTelnetOptionExceptionTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
InvalidTelnetOptionExceptionTest.java:26: cannot find symbol
symbol: class TestCase
public class InvalidTelnetOptionExceptionTest extends TestCase
^
TelnetClientFunctionalTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
TelnetClientFunctionalTest.java:30: cannot find symbol
symbol: class TestCase
public class TelnetClientFunctionalTest extends TestCase
^
TelnetClientTest.java:18: package junit.framework does not exist
import junit.framework.TestCase;
^
TelnetClientTest.java:33: cannot find symbol
symbol: class TestCase
extends TestCase implements TelnetNotificationHandler
^
TelnetOptionTest.java:19: package junit.framework does not exist
import junit.framework.TestCase;
^
TelnetOptionTest.java:26: cannot find symbol
symbol: class TestCase
public class TelnetOptionTest extends TestCase
^
TFTPServerPathTest.java:26: package junit.framework does not exist
import junit.framework.TestCase;
^
TFTPServerPathTest.java:35: cannot find symbol
symbol: class TestCase
public class TFTPServerPathTest extends TestCase
^
TFTPTest.java:30: package junit.framework does not exist
import junit.framework.TestCase;
^
TFTPTest.java:39: cannot find symbol
symbol: class TestCase
public class TFTPTest extends TestCase
^
TimeTCPClientTest.java:24: package junit.framework does not exist
import junit.framework.TestCase;
^
TimeTCPClientTest.java:26: cannot find symbol
symbol: class TestCase
public class TimeTCPClientTest extends TestCase
^
MLSDComparison.java:54: cannot find symbol
symbol : class Test
location: class org.apache.commons.net.ftp.parser.MLSDComparison
@Test
^
IMAPTest.java:28: cannot find symbol
symbol : class Test
location: class org.apache.commons.net.imap.IMAPTest
@Test
^
EnterCurrency.java:401: cannot find symbol
symbol : constructor EnterCurrency(javax.swing.JFrame,boolean)
location: class tradingapplication.EnterCurrency
EnterCurrency dialog = new EnterCurrency(new javax.swing.JFrame(), true);
^
SelectCurrency.java:163: cannot find symbol
symbol : constructor SelectCurrency(javax.swing.JFrame,boolean)
location: class tradingapplication.SelectCurrency
SelectCurrency dialog = new SelectCurrency(new javax.swing.JFrame(), true);
^
SubnetUtilsTest.java:40: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(bcastAddresses[i], info.getBroadcastAddress());
^
SubnetUtilsTest.java:41: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(cidrSignatures[i], info.getCidrSignature());
^
SubnetUtilsTest.java:42: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(lowAddresses[i], info.getLowAddress());
^
SubnetUtilsTest.java:43: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(highAddresses[i], info.getHighAddress());
^
SubnetUtilsTest.java:44: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(networkAddresses[i], info.getNetworkAddress());
^
SubnetUtilsTest.java:45: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(usableAddresses[i], info.getAddressCount());
^
SubnetUtilsTest.java:63: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("ci "+masks[i], cidrS[i], info.getCidrSignature());
^
SubnetUtilsTest.java:64: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("bc "+masks[i], bcast[i], info.getBroadcastAddress());
^
SubnetUtilsTest.java:65: cannot find symbol
symbol : method assertEquals(java.lang.String,int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("ac "+masks[i], usableAd[i], info.getAddressCount());
^
SubnetUtilsTest.java:66: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("nw "+masks[i], netwk[i], info.getNetworkAddress());
^
SubnetUtilsTest.java:67: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("lo "+masks[i], lowAd[i], info.getLowAddress());
^
SubnetUtilsTest.java:68: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("hi "+masks[i], highA[i], info.getHighAddress());
^
SubnetUtilsTest.java:87: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("ci "+masks[i], cidrS[i], info.getCidrSignature());
^
SubnetUtilsTest.java:88: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("bc "+masks[i], bcast[i], info.getBroadcastAddress());
^
SubnetUtilsTest.java:89: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("nw "+masks[i], netwk[i], info.getNetworkAddress());
^
SubnetUtilsTest.java:90: cannot find symbol
symbol : method assertEquals(java.lang.String,int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("ac "+masks[i], usableAd[i], info.getAddressCount());
^
SubnetUtilsTest.java:91: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("lo "+masks[i], lowAd[i], info.getLowAddress());
^
SubnetUtilsTest.java:92: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String,jav a.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("hi "+masks[i], highA[i], info.getHighAddress());
^
SubnetUtilsTest.java:100: cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertTrue(info.isInRange("192.168.0.1"));
^
SubnetUtilsTest.java:102: cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertFalse(info.isInRange("192.168.0.7"));
^
SubnetUtilsTest.java:103: cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertFalse(info.isInRange("192.168.0.8"));
^
SubnetUtilsTest.java:104: cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertFalse(info.isInRange("10.10.2.1"));
^
SubnetUtilsTest.java:105: cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertFalse(info.isInRange("192.168.1.1"));
^
SubnetUtilsTest.java:106: cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.commons.net.SubnetUtilsTest
assertFalse(info.isInRange("192.168.0.255"));
^
SubnetUtilsTest.java:112: cannot find symbol
symbol : method fail(java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
fail("Mask /0 should have generated an IllegalArgumentException");
^
SubnetUtilsTest.java:126: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.0.0.0",info.getNetmask());
^
SubnetUtilsTest.java:127: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(16777216, info.getAddressCount());
^
SubnetUtilsTest.java:132: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.128.0.0",info.getNetmask());
^
SubnetUtilsTest.java:133: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(8388608, info.getAddressCount());
^
SubnetUtilsTest.java:138: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.192.0.0",info.getNetmask());
^
SubnetUtilsTest.java:139: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(4194304, info.getAddressCount());
^
SubnetUtilsTest.java:144: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.224.0.0",info.getNetmask());
^
SubnetUtilsTest.java:145: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(2097152, info.getAddressCount());
^
SubnetUtilsTest.java:150: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.240.0.0",info.getNetmask());
^
SubnetUtilsTest.java:151: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(1048576, info.getAddressCount());
^
SubnetUtilsTest.java:156: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.248.0.0",info.getNetmask());
^
SubnetUtilsTest.java:157: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(524288, info.getAddressCount());
^
SubnetUtilsTest.java:162: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.252.0.0",info.getNetmask());
^
SubnetUtilsTest.java:163: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(262144, info.getAddressCount());
^
SubnetUtilsTest.java:168: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.254.0.0",info.getNetmask());
^
SubnetUtilsTest.java:169: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(131072, info.getAddressCount());
^
SubnetUtilsTest.java:174: cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals("255.255.0.0",info.getNetmask());
^
SubnetUtilsTest.java:175: cannot find symbol
symbol : method assertEquals(int,int)
location: class org.apache.commons.net.SubnetUtilsTest
assertEquals(65536, info.getAddressCount());
^
Note: NNTPClient.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
100 errors


Funny thing is we've added JUnit to the applications directory and modified build.xml to include the JUnit.jar. I am sure we're missing something very obvious but we're not sure what - could anyone shine any light?

Many thanks in advance,