Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error: package junit.framework. does not exist

843830Apr 10 2007 — edited Apr 10 2007
Hello All,
BACKGROUND: I am attempting to "test" a simple program using JUnit 4.1 and Sun's App Server 9, where I have a bean calling a method on a remote component bean.
My program errors because it says that the junit classes do not exist for my import statement (import junit.framework.*;). I placed the junit-4.1.jar in the classpath by adding this path where it resides to the system's CLASSPATH and PATH variables (%JUNIT_HOME%\junit-4.1.jar.........where juint_home = C:\junit4.1).

QUESTION: Could there be a versioning issue? Do I need to place something else in the classpath? Is there some other issue?

Details:
1. I tested a junit class in the command promt to make sure that it was in the classpath by typing javap junit.framework.TestCase, and it reported the back the API instead of an error...so the junit jar file is on the classpath.
2. I copied and pasted the junit jar files in the same folder as my source files to make sure that it was on the class path and I still received that error.

Thanks
Rodney

null
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2007
Added on Apr 10 2007
0 comments
842 views