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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -