I’m trying to add in a CSV reader and I get this error when I compile… I had taken the file from here: http://opencsv.sourceforge.net/ and unzipped it and put the au folder into the src directory of my project (benfords law)… I’ve tried looking high and low to solve this… but yeah fail. Help?
PS – this is an android project if that makes any difference… I’m using netbeans
C:\Users\Spence\Documents\NetBeansProjects\BenfordsLaw\src\au\com\bytecode\opencsv\bean\HeaderColumnNameMappingStrategy.java:5: error: cannot find symbol
import java.beans.BeanInfo;
symbol: class BeanInfo
location: package java.beans
C:\Users\Spence\Documents\NetBeansProjects\BenfordsLaw\src\au\com\bytecode\opencsv\bean\HeaderColumnNameMappingStrategy.java:6: error: cannot find symbol
import java.beans.IntrospectionException;
symbol: class IntrospectionException
location: package java.beans
C:\Users\Spence\Documents\NetBeansProjects\BenfordsLaw\src\au\com\bytecode\opencsv\bean\HeaderColumnNameMappingStrategy.java:7: error: cannot find symbol
import java.beans.Introspector;
symbol: class Introspector
location: package java.beans
C:\Users\Spence\Documents\NetBeansProjects\BenfordsLaw\src\au\com\bytecode\opencsv\bean\HeaderColumnNameMappingStrategy.java:8: error: cannot find symbol
import java.beans.PropertyDescriptor;
symbol: class PropertyDescriptor
location: package java.beans
C:\Users\Spence\Documents\NetBeansProjects\BenfordsLaw\src\au\com\bytecode\opencsv\bean\MappingStrategy.java:22: error: cannot find symbol
import java.beans.IntrospectionException;
symbol: class IntrospectionException
location: package java.beans
This are all import errors that are found in the opencsv.bean package. If you aren’t planning on dealing with the beans in there, you could probably just remove that folder. In fact, if I were you I would just copy the source files that I wanted into a package (folder) inside my app and then just reference it from there!
If you DO actually want to use the beans stuff, you are going to need to install it and reference the library in NetBeans. I think NetBeans already comes with it though, so you would probably only need to reference it then.