Hello, I'm doing a java program to convert csv files to bib. As the csv file can be 200kb or 2G I decided to read line by line so I do not have problems with low memory. I made the code as follows:
try {
File file = new File(caminhoAbrirArquivos + nome);
Scanner inputStream = new Scanner(file);
linha = inputStream.nextLine();//A primeira linha é o cabeçalho, então descarto
while (inputStream.hasNextLine()) {
linha = inputStream.nextLine();
//Código que realiza a conversão da linha
}
} catch (FileNotFoundException ex) {
JOptionPane.showMessageDialog(null, "Erro: " + ex.getMessage(), "Erro", JOptionPane.ERROR_MESSAGE);
}
I finished the program, tested it and it worked. But when I ran JAR to use the program it read only the first 30 lines of the file.
When I run the project in Netbeans it reads the entire file and converts, all right, now when I generate the project JAR and run it reads only the first 30 lines of the file and converts only those.
Does anyone know what might be happening?