I am currently using this approach to upload files to my applications:
Path path = Paths.get(ClassLoader.class.getResource(fileName).toURI());
where fileName is structured as "/package1/package2/folder/file.lol".
Are there any better, simpler, or more correct methods for getting a Path object? I also need to work in the JAR.
user1266094
source share