bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.46k stars 581 forks source link

Error message for why org.bytedeco.javacpp.cachedir could not be created #603

Open Robbie-Palmer opened 1 year ago

Robbie-Palmer commented 1 year ago

The cache dir can be set via the system property org.bytedeco.javacpp.cachedir The Loader.getCacheDir() method will try this path, plus some others, and if creating all of these fails, it throws the error IOException("Could not create the cache: Set the \"org.bytedeco.javacpp.cachedir\" system property.");

If org.bytedeco.javacpp.cachedir has been set, but could not be created, then this error message is misleading, as it suggests the system property wasn't set properly

If org.bytedeco.javacpp.cachedir has been set, then it should be checked on its own and an error thrown explaining why this specific path could not be used

saudet commented 1 year ago

Please open a pull request with suggested changes! Thanks for reporting