java - How to access folders outside of a JAR -


i have project in eclipse reads , writes new files- works eclipse, when save jar no longer works. example:

readconfig(newfile(settings.class.getprotectiondomain().getcodesource().getlocation().getpath() + "chronos/functions/config")); 

therefore, how load files outside source (assuming there no way inside jar)?. example, if had jar in folder called data- type in access data folder?

  • if need read should able use getresourceasstream() read file inside of jar.
  • if want read , write use folder next jar file. see here answer.

Comments