Problem Compiling doing a compile after a long time

Posted on 2005-04-06
Last Modified: 2013-11-23
Hi All:

I used java a number of years back and doing a compile after a long time. I am having the following problem.
I try and compile a program I get the following problem: package com.meterware.httpunit does not exist
import com.meterware.httpunit.*;
^ package junit.framework does not exist
import junit.framework.*;
^ package junit does not exist
import junit.*;
^ cannot resolve symbol
symbol  : class TestCase

I have added library for httpunit but not for junit yet.  I have added httpunit.jar file path to my CLASSPATH.
Please let me know  how to get rid of these compile errors.


Question by:sunnybrad
    LVL 92

    Expert Comment

    Add the required jars to uyou jdk's 'ext' directory.
    LVL 15

    Expert Comment

    httpunit requires junit.jar which an be downloaded from
    Add it to your classespath
    LVL 92

    Assisted Solution

    It'll be something like:

    LVL 92

    Expert Comment

    Adding jar's to your ext directory avoids having to add them to your classpath.

    Author Comment

    Thanks for all the comments from experts I will try things out.

    LVL 15

    Accepted Solution

    You need the junit.jar in anycase.
    Personally I prefer to keep the JDK extension folder clean (unless it provides a huge advantage for my needs).
    Putting stuff there might cause problems when that framework is using dynamic class loading (which Junit framework does for sure).
    For more info about that look at
    I think you can go with what you did before and just add the needed libraries (junit.jar in this case) to your CLASSPATH
    LVL 92

    Expert Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Multiple issues with Java 14 37
    NotAlone Challenge 20 65
    java constructor error 8 64
    word0 challenge 4 37
    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now