I would like to be able to open a text file stored inside an unsigned jar without raising security flags. I already managed to open images from within the jar but all the methods I have found for text threw security exceptions.
1 2 3 4 5 6
| private static BufferedReader readFile(String folderName, String fileName) throws IOException { BufferedReader reader = null; URL url = new URL(GamePanel.rootFolder+folderName+fileName); reader = new BufferedReader(new InputStreamReader(url.openStream())); return reader; } |