Your code probably has two issues.
First, the import statement is wrong since in Java you cannot add a package itself, but all classes of a package as follows (note .*;
at the end):
import org.apache.commons.math4.linear.*;
or a specific class, e.g.
import org.apache.commons.math4.linear.FieldMatrix;
Second, you use the Java Platform Module System (JPMS) by having a module-info.java
file in the default package probably without the required requires <module>;
statement. JPMS was introduced in Java 9 and you have Java 12.
Do one of the following:
- Delete the
module-info.java
file (if needed, you can recreate it via right-clicking the project folder and choosing Configure > Create module-info.java)
- In
module-info.java
add the corresponding requires
statement, e.g. by going to the line with the import
statement and using the corresponding Quick Fix (Ctrl+1)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…