• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Problems installing JUnit on Linux

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
expectation is the root of all heartache - shakespeare. tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic