変数 'file_Base_Path' を持つアプリケーションがあり、propertyFile (sample.properties など) からその値を読み取っています。変数の値を user.home に設定したいのですが、 ${user.home}が機能していません。Linux と Windows の両方で機能するように値を user.home に設定する方法。
注: System.getProperties('user.home') は使用できません。値が常に user.home であるとは限らないため、異なる場合があります
サンプルのプロパティ:
file_Base_Path=${user.home}
値の設定方法:
properties.getProperty("file_Base_Path") //i'm expecting '/home/user' but it is returning '${user.home}'
ありがとう