Answer the question
In order to leave comments, you need to log in
Why is the library not imported in Java?
I'm learning java, I downloaded the jar archive of the opencsv library, I'm trying to import it:
package Char2;
import java.io.FileReader;
import Char2.libs.opencsv.CSVReader;
class Ex13 {
public static void main(String[] args) {
CSVReader reader = new CSVReader(new FileReader("csv/t1.csv"));
String[] nextLn;
while((nextLn = reader.readNext()) != null) {
System.out.println(nextLn[0] + nextLn[1] + nextLn[2]);
}
}
}
Answer the question
In order to leave comments, you need to log in
The directive import
takes the name of the package being imported, not the path. It should be like this .
Relevant section of the documentation .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question