Soldtodie Posted November 23, 2015 Posted November 23, 2015 BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(SMiner.class.getResourceAsStream("/resources/"))); String line = bufferedReader.readLine(); listModel = new DefaultListModel(); while(line != null){ listModel.addElement(line.substring(0, line.length() - 4)); line = bufferedReader.readLine(); } list.setModel(listModel); This should show me all resources. It works local but not on the sdn. Why?
FrostBug Posted November 23, 2015 Posted November 23, 2015 Not 100% sure, but since OSBot obfuscates everything, the package structure may be refactored (most obfuscators remove package structure), invalidating this relative path
Soldtodie Posted November 23, 2015 Author Posted November 23, 2015 Not 100% sure, but since OSBot obfuscates everything, the package structure may be refactored (most obfuscators remove package structure), invalidating this relative path and what should i do now?
FrostBug Posted November 23, 2015 Posted November 23, 2015 and what should i do now? mm.. I think a dev posted a solution to it somewhere in the dev section (probably a couple of pages back by now) Alternatively you could download them (if mostly images)
Ericthecmh Posted November 23, 2015 Posted November 23, 2015 and what should i do now? Try using this.getClass() instead of SMiner.class Last time I think that fixed Valkyr's problem.
Soldtodie Posted November 23, 2015 Author Posted November 23, 2015 I found the problem to list the files is not possible idk why but directly call the files works.
FrostBug Posted November 23, 2015 Posted November 23, 2015 I found the problem to list the files is not possible idk why but directly call the files works. Found the thread, in case you run into any further problems http://osbot.org/forum/topic/80846-using-resources-folder/ Probably has be named "resources" exactly