This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems installing JUnit on Linux

 
Steiner Egdal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to install JUnit to use from commandline on Linux machine.

I have tried to follow the following instructions for an older but similar version of the downloaded package:

Installation
Below are the installation steps for installing JUnit:
unzip the junit4.6.zip file
add junit-4.6.jar to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit-4.6.jar;INSTALL_DIR
test the installation by running java org.junit.runner.JUnitCore org.junit.tests.AllTests

Notice: that the tests are not contained in the junit-4.6.jar but in the installation directory directly. Therefore make sure that the installation directory is on the class path
Important: don't install junit-4.6.jar into the extension directory of your JDK installation. If you do so the test class on the files system will not be found.


I have created a folder at /home/me/.junit/ and extracted the zip.file here. In my .bashrc I have

When I do the suggested


I get


And I get a similar error independently of from where I run the command. Any suggestions ?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Are you sure the pathname is exactly correct?

When you do: ls -l /home/me/.junit/junit4.2.8 do you see that the file junit-4.2.8.jar is present in the directory?

When you do: echo $CLASSPATH what do you get?
 
Steiner Egdal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dang ! That was an embarassment Seing your reply and reading my own post again, made me realise that I have been typing the wrong directory name into my .bashrc permuting the 2 and 8 in 4.8.2, and looking at it for too long to reveal axactly how long without seeing it! It was the actual copy pasting I gave and it shows my mistake. Thanks, Ill go hide for a couple of days
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic