• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Problem Compiling doing a compile after a long time

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:

admin1.java:1: package com.meterware.httpunit does not exist
import com.meterware.httpunit.*;
^
admin1.java:2: package junit.framework does not exist
import junit.framework.*;
^
admin1.java:3: package junit does not exist
import junit.*;
^
admin1.java:13: 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.

Regards

-sunnybrad
0
sunnybrad
Asked:
sunnybrad
  • 4
  • 2
2 Solutions
 
objectsCommented:
Add the required jars to uyou jdk's 'ext' directory.
0
 
aozarovCommented:
httpunit requires junit.jar which an be downloaded from http://prdownloads.sourceforge.net/junit/junit3.8.1.zip?download
Add it to your classespath
0
 
objectsCommented:
It'll be something like:

C:\j2sdk1.4.2_06\jre\lib\ext
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
objectsCommented:
Adding jar's to your ext directory avoids having to add them to your classpath.
0
 
sunnybradAuthor Commented:
Thanks for all the comments from experts I will try things out.

-sunnybrad
0
 
aozarovCommented:
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 http://www.neward.net/ted/Papers/ClassForName/index.html 
I think you can go with what you did before and just add the needed libraries (junit.jar in this case) to your CLASSPATH
0
 
objectsCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now