プログラム(下のa.class)の中で、
Properties prop = new Properties();
prop.load(new FileInputStream("test.properties"));
こういう呼びだし方をしています。
下記のようなファイル構成で、シェル(a.sh)の中で
java -cp `dirname $0` test.a
という呼び方で実行したいと考えています。
A┬ test
| └― a.class
├ test.properties
└ a.sh
ここでどのようなシェルの実行の仕方をしても
( A/a.sh 、 /***/A/a.sh 、 ./a.sh)
test.propertiesファイルを読み込めるようにしたいのですが、
どのように実装すればよいのでしょうか。