-CodeGetResource mit Google io Dateien führt zu FileNotFoundException für Datei aus Glas root
Files.toString(new File(Thread.currentThread().getContextClassLoader().getResource(
"login_commands.json").getFile()), Charsets.UTF_8)
Exception
java.io.FileNotFoundException: file:\C:\application\target.jar!\login_commands.json (The filename, directory name, or volume label syntax is incorrect)
Jar Struktur
- root
- login_commands.json
- usw.
Der Code funktioniert gut von IDE.
Wie lese ich diese Datei?