I'm working on a correcting system for assignments for students. Let me try to break my problem down into a simple example.
The projects I want to check look like this:
Now I want to check if the project has a correct implementation, but I can not assure, that Solution1.java exists, so I'm using reflection to access the classes.
I'm copying a package into the src folder, so the new project looks like this.
I don't know, if the Solution.java actually exists, so I'm using reflections.
Now I'm compiling everything inside the project and run the Correction.java - file in Linux.
This works fine so far.
In order to speed up the process, I tried to create a Solution.jar file, so I don't have to compile the file for every project. When I run the jar-file I'm getting a ClassNotFound exception, when I try to access Solution1. The jar file lies within the Correction-package.
I'm starting inside the src folder, and I run:
java -jar ./Correction/Correction.jar
Does anyone know, why this might be happening?