package junit.framework does not exist

N

newbie

Hi All

I am trying to compile some code, but can not since the compiler can
not find the junit package.

The line in questions is:

[javac] C:\EclipseProjects\chs\src\com\sample\foo\AllTests.java:3:
package junit.framework does not exist
[javac] import junit.framework.TestCase;

The classpath is as follows:

C:\EclipseProjects\test>set BUILD_ROOT_HOME=C:\EclipseProjects\test\

C:\EclipseProjects\test>set ANT_HOME=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0

C:\EclipseProjects\test>set ANT_OPTS=-Xms256M -Xmx1024M

C:\EclipseProjects\test>set JUNIT_HOME=C:\prj\lib\junit.jar

C:\EclipseProjects\test>set JAVA_HOME=C:\EclipseProjects\test\3rdparty
\jdk\latest\windows

C:\EclipseProjects\test>set PATH=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0\bin;C:\EclipseProjects\test\3rdparty\jdk\latest
\windows\bin;C:\ccviews
\torero\cvp1\lib\junit.jar;C:\Program Files\ThinkPad\Utilities;C:
\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files
\QuickTime\QTSy
stem\;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program
Files\Intel\Wireless\Bin\;C:\WINDOWS\Downloaded Program Files;C:
\Program Files\Cr
edant\CMG Shield;C:\Program Files\Rational\ClearCase\bin;C:\Program
Files\Rational\common;C:\Program Files\Diskeeper Corporation\Diskeeper
\;C:\Program
Files\Attachmate\Reflection\;C:\Program Files\ssh communications
security\ssh Secure Shell;C:\Program Files\Java\jdk1.5.0_15\bin;

From Eclipse, the project compile fine, but from the command line, I
get the package not found error.

I have included junit.jar in the classpath, still I can not compile.

Help would be appreciated.

Thanks
PurvaHi All

I am trying to compile some code, but can not since the compiler can
not find the junit package.

The line in questions is:

[javac] C:\EclipseProjects\chs\src\com\sample\foo\AllTests.java:3:
package junit.framework does not exist
[javac] import junit.framework.TestCase;

The classpath is as follows:

C:\EclipseProjects\test>set BUILD_ROOT_HOME=C:\EclipseProjects\test\

C:\EclipseProjects\test>set ANT_HOME=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0

C:\EclipseProjects\test>set ANT_OPTS=-Xms256M -Xmx1024M

C:\EclipseProjects\test>set JUNIT_HOME=C:\prj\lib\junit.jar

C:\EclipseProjects\test>set JAVA_HOME=C:\EclipseProjects\test\3rdparty
\jdk\latest\windows

C:\EclipseProjects\test>set PATH=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0\bin;C:\EclipseProjects\test\3rdparty\jdk\latest
\windows\bin;C:\ccviews
\torero\cvp1\lib\junit.jar;C:\Program Files\ThinkPad\Utilities;C:
\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files
\QuickTime\QTSy
stem\;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program
Files\Intel\Wireless\Bin\;C:\WINDOWS\Downloaded Program Files;C:
\Program Files\Cr
edant\CMG Shield;C:\Program Files\Rational\ClearCase\bin;C:\Program
Files\Rational\common;C:\Program Files\Diskeeper Corporation\Diskeeper
\;C:\Program
Files\Attachmate\Reflection\;C:\Program Files\ssh communications
security\ssh Secure Shell;C:\Program Files\Java\jdk1.5.0_15\bin;

From Eclipse, the project compile fine, but from the command line, I
get the package not found error.

I have included junit.jar in the classpath, still I can not compile.

Help would be appreciated.

Thanks
newbie
 
A

Arne Vajhøj

newbie said:
I am trying to compile some code, but can not since the compiler can
not find the junit package.

The line in questions is:

[javac] C:\EclipseProjects\chs\src\com\sample\foo\AllTests.java:3:
package junit.framework does not exist
[javac] import junit.framework.TestCase;

The classpath is as follows:

C:\EclipseProjects\test>set BUILD_ROOT_HOME=C:\EclipseProjects\test\

C:\EclipseProjects\test>set ANT_HOME=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0

C:\EclipseProjects\test>set ANT_OPTS=-Xms256M -Xmx1024M

C:\EclipseProjects\test>set JUNIT_HOME=C:\prj\lib\junit.jar

C:\EclipseProjects\test>set JAVA_HOME=C:\EclipseProjects\test\3rdparty
\jdk\latest\windows

C:\EclipseProjects\test>set PATH=C:\EclipseProjects\test\3rdparty
\apache-ant-1.7.0\bin;C:\EclipseProjects\test\3rdparty\jdk\latest
\windows\bin;C:\ccviews
\torero\cvp1\lib\junit.jar;C:\Program Files\ThinkPad\Utilities;C:
\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files
\QuickTime\QTSy
stem\;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program
Files\Intel\Wireless\Bin\;C:\WINDOWS\Downloaded Program Files;C:
\Program Files\Cr
edant\CMG Shield;C:\Program Files\Rational\ClearCase\bin;C:\Program
Files\Rational\common;C:\Program Files\Diskeeper Corporation\Diskeeper
\;C:\Program
Files\Attachmate\Reflection\;C:\Program Files\ssh communications
security\ssh Secure Shell;C:\Program Files\Java\jdk1.5.0_15\bin;

From Eclipse, the project compile fine, but from the command line, I
get the package not found error.

I have included junit.jar in the classpath, still I can not compile.

You have not posted what your classpath is.

You have junit.jar in PATH, which does not do any good.

I strongly suspect that it is not in your classpath.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top