For my first attempt to work with both junit and eclipse, I have created a small test class, which resides in the src directory and a small tester object. This resides in a seperate test directory. Both src and test are marked as source directory.
The code of the class itself is working. and I can run it from eclipse, but the test object fails to run from eclipse. Eclipse keeps saying "The type org.junit.Assert is not accessible" on the very first line "import static org.junit.Assert.*;". I cannot find out what to do.
I have put junit4 on the classpath (build path> add library> Junit> Junit4). The test class is created by eclipse itself (new Junit testcase, junit4). From the command line I can compile the java file to a class file, but eclipse refuses to find junit.
Manual works OK:
javac -cp /path/to/org.junit_4.13.0.v20200204-1500.jar Addtester.java
I must have overseen an important detail, but right now I am out of ideas.
Thanks in advance, Ruud
module-info.javafile, delete it. Otherwise, show what you have in Project > Properties: Java Build Path, in the Libraries tab.module-info.javameans using JPMS which requires arequires ...;line in that file and the JAR on the modulepath, not on the classpath (-cp).