If it is just data you will need to read the data in from a resource.
Arrange for your data file to be in the same location as the class file and use something like this:
class Primes {
private static final ArrayList<Integer> NUMBERS = new ArrayList<>();
private static final String NUMBER_RESOURCE_NAME = "numbers.txt";
static {
try (InputStream in = Primes.class.getResourceAsStream(NUMBER_RESOURCE_NAME);
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr)) {
for (String line; (line = br.readLine()) != null;) {
String[] numberStrings = line.split(",");
for (String numberString : numberStrings) {
if (numberString.trim().length() > 0) {
NUMBERS.add(Integer.valueOf(numberString));
}
}
}
} catch (NumberFormatException | IOException e) {
throw new IllegalStateException("Loading of static numbers failed", e);
}
}
}
I use this to read a comma separated list of 1000 prime numbers.