Мой путь к классам связан с домом junit, который содержит как hamcrest-core-1.3.jar, так и junit-4.12.jar. Вроде бы junit узнал, но я получаю NoClassDefFoundError: org/hamcrest/SelfDescribing.
Я думаю, мне нужно как-то связать hamcrest с переменной classpath, но я не уверен, как это сделать.
Это содержимое моей переменной пути к классам:
%CLASSPATH%;%JUNIT_HOME%\junit-4.12.jar;.;
Просто для улучшения читабельности.




В Спецификации пути к классам Java 8 вы можете изменить запись пути к классам на:
%CLASSPATH%;%JUNIT_HOME%/*;.;
Конкретно:
Class path entries can contain the base name wildcard character (*), which is considered equivalent to specifying a list of all of the files in the directory with the extension .jar or .JAR. For example, the class path entry mydir/* specifies all JAR files in the directory named mydir. A class path entry consisting of * expands to a list of all the jar files in the current directory. Files are considered regardless of whether they are hidden (have names beginning with '.').
Вы спрашиваете, как изменить переменную CLASSPATH? что ты уже испробовал?