You need to use
InputStream is = this.getClass().getResourceAsStream();
once you package your source as a jar. You have just one file : your jar
. Your vocabulary.csv
is no longer a standalone file on filesystem anymore.
You can read more here.