Usually, clicking on a line in the stacktrace, the source file opens at the offending line. With Eclipse-oxygen (R with support for java9 installed) and java9 (u175) it shows a dialog "Source not found" if the source is somewhere inside the java modules. Source is found as expected, when navigating (by F3) in the editor.
What's/where's wrong and how-to fix it?
Below is a simple two-liner example which fails, showing the stacktrace:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 5 out-of-bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.set(ArrayList.java:453)
at dummy.PlainStacktrace.main(PlainStacktrace.java:10)
The two-liner:
import java.util.ArrayList;
public class PlainStacktrace {
public static void main(String[] args) {
ArrayList list = new ArrayList();
list.set(5, "error");
}
}