Q:

Assertion Error when running `SolrTestCaseJ4` tests: Fix your classpath to have tests-framework.jar before lucene-core.jar

When trying to run simple tests using Solr's testing framework I get the following Error message:

java.lang. AssertionError: fix your classpath to have tests-framework.jar before lucene-core.jar
at __randomizedtesting.SeedInfo.seed(...)

I'm using the IntelliJ IDEA IDE.  How do I fix the classpath to have tests-framework.jar before lucene-core.jar? 

A:

In certain situations, the order of libraries may be important.  <..>
For the compilation to succeed, certain libraries (e.g. the ones having to do with the JDK itself and its extensions) must be included in the module bootclasspath.  So, such libraries must appear in the list before the JDK. 

For more details see relevant chapter of IntelliJ Web help.