Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 215516

Re:saving data to local file system alternatives

$
0
0

I don't have a sample for this option but it should basically involve:

- adding a configuration file to your .jar service bundle.

- adding the folder location of the configuration file to the Bundle-Classpath section of the jar's MANIFEST.MF.

- reading your configuration file as a resource using the correct class loader. If needed you may temporarily set the class loader to a class from the same .jar bundle (e.g. getClass().getClassLoader()). This is done using Thread.currentThread().setContextClassLoader(<new-class-loader-here>) but make sure to restore the old class loader after reading the file.

Cheers,

Vladi


Viewing all articles
Browse latest Browse all 215516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>