I have a problem with java.util.NoSuchElementException error in NetBeans, but in Eclipse everything works fine. I dont know what to think about this. In code I show where is buging. I have does .csv files in project folder. Sorry for using Polish language in this project.
File dostawcy = new File("Dostawcy.csv");
File magazynp = new File("Magazynp.csv");
File magazynw = new File("Magazynw.csv");
File slownik = new File("Slownik.csv");
Scanner loadDostawcy = new Scanner(dostawcy); // HERE SHOWS BUG
String syf0 = loadDostawcy.nextLine();
Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1371)
at Main.Wczytanie(Main.java:95)
at Main.main(Main.java:19)
I have this in static method called Wczytywanie, so thats why shows "at Main.Wczytanie(Main.java:95)". Im sure there is an element in there because in eclipse it works.
From what it seems like, your project isn't loading the csv files. Could just be that you need to specify a path to the files.
Something like: