I recently faced a problem when I was trying to run a junit test in eclipse. I was getting a ClassNotFoundExcpetion. So, I googled a bit and tried out a solution where I had to move the JRE System Library below the rest of the jars and it worked!!! But I couldn't find and apt explaination on why I needed to do that. Can anyone let me know?

When I said I moved JRE Sytem Library below, I meant in the build path.

To be more precise. It started working after I moved the JRE System Library below the junit jar in the build path.

Above description wouldn't help in solving your issue. If your build is dependent on JRE System Library above/below JUnit.jar it is plainly obvious you are dependent on IDE and your project will not build sucessfuly from command line, therefore cannot be run from CI. I do strongly suggest to check out Gradle or Maven

though I do wonder what he's done that makes his eclipse project's compiling dependent on the order of dependencies in the project settings window :)

though I do wonder what he's done that makes his eclipse project's compiling dependent on the order of dependencies in the project settings window :)

I do remember NetBeans being funny back in the day while building JME app and you messed up order ;)
But hey then I been student and had no clue about building tools, and been happy IDE did it for me :D

Edited 1 Year Ago by peter_budo

Maybe created a class with the same name as a JRE class that was imported with a .* ?

Not really. The name of the class is definitely not related to the name of a JRE class.

Edited 1 Year Ago by newcoder310

you compared it to every class in the JRE?
it doesn't even need to be that class. I remember a guy having created his own String class, and later on not understanding why
public static void main(String[] args){

was compilable, yet not usable as an entry point for the application.

I'm a little hesitant to reveal the names of the classes that I'm working on(Not my classes). But it would be great if you would guide me on how to verify myself.

Well, it doesn't match any. I'm marking this solved. Lets not drag it. Thanks for you input guys.

Well for the future it will be better if you can post small sample where you can demonstrate issue as above problem description obviously was not clear

This question has already been answered. Start a new discussion instead.