I just installed the Apache Commons math library with apt (libcommons-math3-java
) on my debian machine and apparently it gets installed to the /usr/share/java
directory:
$ ls /usr/share/java | grep math
commons-math3-3.3.jar
commons-math3.jar
But importing the package in Java doesn't work:
import org.apache.commons.math3.*;
class TestClass {
public static void main(String[] args) {
System.out.println("Hello? World?");
}
}
Trying to compile produces the following result:
$ javac TestClass.java
TestClass.java:1: error: package org.apache.commons.math3 does not exist
import org.apache.commons.math3.*;
^
1 error
How do I use the library? Please help.