How do i get the Path of a file in the same package as the class?
This doesn't work.
public static void SaveAllMockData() throws Exception {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("mockdata.json");
}
How do i get the Path of a file in the same package as the class?
This doesn't work.
public static void SaveAllMockData() throws Exception {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("mockdata.json");
}
Copyright © 2021 Jogjafile Inc.
You can use
or you can specify the package path