wiki:DespoinaLog/2010/09/21

Version 1 (modified by trac, 14 years ago) (diff)

--

Alternative solution for reaching configuration file

A solution for reaching the profile file without the actual path :

  1. place properties file in the same directory with your plugin
  2. File argh = new File(this.getClass().getResource("LuceneIndexConfiguration.properties").getFile().replace("%20", " "));

System.out.println(argh.getAbsolutePath());

INDX = argh.getAbsolutePath(); this is your path

LOAD it:

Properties configFile = new Properties();

try {

configFile.load(new FileInputStream (INDX));

} catch (IOException e) {

http://www.coderanch.com/t/278616/Streams/java/find-workspace-path-at-runtime#1281656

http://stevelosh.com/blog/2010/09/coming-home-to-vim/

http://www.jonlee.ca/hacking-vim-the-ultimate-vimrc/