0

I downloaded the mockito-all-1.9.5.jar and put it in ~/java. Then I set the classpath -

export CLASSPATH=~/java

I am getting this error -

a.java:3: package org does not exist
import static org.mockito.*;

Any ideas what can be the cause?

Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Nishant
  • 1
  • 3

2 Answers2

0

Why do you want to put the library in your classpath ?

If there is no special reason, the good way to add a jar is to put the jar in your project, then from eclispe, click right on the jar and click on buildPath->Add to build path.

Eliott Roynette
  • 716
  • 8
  • 21
0

Add the jar to your classpath:

export CLASSPATH=~/java/mockito-all-1.9.5.jar

The class files are not in your ~/java but in the jar file.

laalto
  • 150,114
  • 66
  • 286
  • 303