Closed koppor closed 1 year ago
We found another way. See https://github.com/JabRef/jabref/pull/10323.
The IntelliJ issue is https://youtrack.jetbrains.com/issue/IDEA-119280.
We still need to craft an MWE as reproducer.
The issue is that in a module, only the first classpath is searched. IntelliJ puts the classes out directory, before the resources out directory, which is then not searched.
While working on https://github.com/JabRef/jabref/pull/9355 (a refined guide for IntelliJ), I found out, that it is not possible to start
Launcher
.This PR outlines fixes. I think, these are all wrong, because, IntelliJ IDEA - getClass().getResource("...") return null.
When starting from IntelliJ using
Launcher
, I get following exception:I traced it down to following code
I removed the starts and now JabRef runs.
Then, I got a bunch of exception, because
.class.getResource(...)
is always null at IntelliJ. I tried solutions from https://stackoverflow.com/q/26328040/873282. The main solutions weregetClassLoader
/
.However, then I would have had to prefix each filename with the package name path. This is IMHO unreadable. So, I skipped and will try to create an MWE and file an IntelliJ issue.
Notes: