-1

私は次のコードを書き、これらのエラーを導入しました。私のコードは次のとおりです。

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/*import com.csvreader.CsvReader;*/ 

public class CsvReaderExample {

    public static void main(String[] args) {

        try{
            String pathName = System.getProperty("user.dir") +  
                    (CsvReaderExample.class.getPackage() == null ? "" : "\\" + 
                    CsvReaderExample.class.getPackage().getName().replace('.', '\\'));
            FileReader klausuar = new 
                    FileReader("klausurphase_propa_anonym.csv");
            CSVReader reader = new CSVReader("klausuar");
            String [] nextLine;

            while ((nextLine = reader.readNext()) != null) {
                // nextLine[] is an array of values from the line
                System.out.println(nextLine[0] + nextLine[1] + nextLine[2] + 
                     nextLine[3] + nextLine[4]);
            }
        klausuar.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

}
}

スタックトレース

    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:97)
    at java.io.FileReader.<init>(FileReader.java:58)
    at CsvReaderExample.main(CsvReaderExample.java:12)

誰でも私を助けることができますか?? 前もって感謝します。

キタム

4

1 に答える 1