package lecture.fileio;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import jp.avaj.lib.debug.L;
/** リソースを読む - パッケージあり Java */
class ResourceReadWithPackage {
public static void main(String[] args) {
ResourceBundle bundle = null;
try {
// lecture.fileio.res0.propertiesのファイル
bundle = ResourceBundle.getBundle("lecture.fileio.res0");
} catch (MissingResourceException e) {
e.printStackTrace();
return;
}
String value = null;
try {
value = bundle.getString("mykey");
} catch (MissingResourceException e) {
e.printStackTrace();
return;
}
L.p(value);
}
}
//---------------------------------------------------
//・目次 - ファイル入出力
// http://blogs.yahoo.co.jp/artery2020/40607767.html
//・目次 - Java入門
// http://blogs.yahoo.co.jp/artery2020/39975776.html
//・目次 - ビジネスパーソンの常識と非常識
// http://blogs.yahoo.co.jp/artery2020/39728331.html
//・目次 - 論理・発想・思考についての考察と鍛え方
// http://blogs.yahoo.co.jp/artery2020/39657784.html
//・目次 - 単なる雑談
// http://blogs.yahoo.co.jp/artery2020/40599964.html
//---------------------------------------------------
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import jp.avaj.lib.debug.L;
/** リソースを読む - パッケージあり Java */
class ResourceReadWithPackage {
public static void main(String[] args) {
ResourceBundle bundle = null;
try {
// lecture.fileio.res0.propertiesのファイル
bundle = ResourceBundle.getBundle("lecture.fileio.res0");
} catch (MissingResourceException e) {
e.printStackTrace();
return;
}
String value = null;
try {
value = bundle.getString("mykey");
} catch (MissingResourceException e) {
e.printStackTrace();
return;
}
L.p(value);
}
}
//---------------------------------------------------
//・目次 - ファイル入出力
// http://blogs.yahoo.co.jp/artery2020/40607767.html
//・目次 - Java入門
// http://blogs.yahoo.co.jp/artery2020/39975776.html
//・目次 - ビジネスパーソンの常識と非常識
// http://blogs.yahoo.co.jp/artery2020/39728331.html
//・目次 - 論理・発想・思考についての考察と鍛え方
// http://blogs.yahoo.co.jp/artery2020/39657784.html
//・目次 - 単なる雑談
// http://blogs.yahoo.co.jp/artery2020/40599964.html
//---------------------------------------------------