Eclipse's default classpath consists of three parts:
1, the bin directory of the JDK;
2. All other jar package paths referenced by the project
3. Project Root path (yes, not bin path)
With Eclipse's export jar capability, the bin directory will be the root of the jar, not the project directory on the upper level of the bin, so that the package path of the class is correct, and the resource files, configuration files, etc. in the project directory are also copied here. That is equivalent to the project directory to copy these files to the bin directory before packaging, so that the relative path of the file will be in line with the default classpath.
It can be summed up from the above: When Eclipse runs directly, it takes the project's root directory as the base directory. When packaged as a jar runtime, the bin directory is used as the base directory. The difference between the two levels of the directory, if not understood, may lead to errors. I hope you will pay attention.