Gradle can't find class files

(xiaoxi_luo) #1

I am trying to run junit tests and got the error “could not find or load main class”. I tried to run the same tests with ant and eclipse. Both work fine. I checked all the dependencies of gradle and they were all listed. I saw all the test source class files being generated in \build\classes\test. Do I need explicitly add my test sources as gradle dependency like ant does? I presumed gradle would take care of it automatically. Am I missing sth obvious here?

(Peter Niederwieser) #2

Where/when exactly do you get this error? Please provide the full error message, the output of ‘gradle -v’, and the ‘–stacktrace’ output (wrapped in HTML code tags).

(xiaoxi_luo) #3

Sorry for my late reply. It turns about to be our environment issue. Thanks for your quick reply.

(Colin Shewell) #4

What was the environment issue as I’m having the same problem