InputStream inputStream =
Card.class.getResourceAsStream("/GymSoftwarePics/DEMO1.csv");
if (inputStream != null) {
beans = new CsvToBeanBuilder(new FileReader("src/main/resources/GymSoftwarePics/DEMO1.csv"))
.withType(Card.class).build().parse();
} else {
System.err.println("CSV file not found in the classpath.");
}
That is the code I have right now, and it is throwing a ClassNotFoundException at the withType(Card.class) line. However, it doesn't throw the same exception in the inputStream line(yes I know it doesn't do anything). Does anyone know why it is throwing a class not found exception? the class does exist and is called Card