Soldtodie Posted November 23, 2015 Share 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? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted November 23, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...
Soldtodie Posted November 23, 2015 Author Share 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? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted November 23, 2015 Share 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) Quote Link to comment Share on other sites More sharing options...
Ericthecmh Posted November 23, 2015 Share 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. Quote Link to comment Share on other sites More sharing options...
Soldtodie Posted November 23, 2015 Author Share Posted November 23, 2015 I found the problem to list the files is not possible idk why but directly call the files works. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted November 23, 2015 Share 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 Quote Link to comment Share on other sites More sharing options...