看了API,没有设置路径的函数
只能放在classpath下吗?最终程序是这样的:
/home/run.bat
/config/message files
/lib/*.jar
用..\config\message取不出来
很想用它的依据本地locale自动使用对应文件的功能。
只能放在classpath下吗?最终程序是这样的:
/home/run.bat
/config/message files
/lib/*.jar
用..\config\message取不出来
很想用它的依据本地locale自动使用对应文件的功能。
解决方案 »
- jvm死锁(紧啊)
- 怎么运行Applicationa
- 请教:程序里有两个包,怎么写编译批处理文件和运行批处理文件
- java中用jxl操作EXCEL时出错的问题 在线求救 ~~~~~~~~~
- java.sql.*中的jdbc问题我想把ResultSet抽出来作为一个类!简化数据库操作!可是怎么关闭??Statement;ResultSet
- 一个JAVA小问题,请大家帮帮忙.
- java编译问题
- 开发Applet是否需要设置classpath?
- 一个菜鸟的问题:Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
- 大家都用JBuilder做什么啊?
- 怎样改变JTable中表的行列值大小
- 发段基础代码,有个地方不太明白。
private static final String DEFAULT_RESOURCE_PATH
= "resources.languages.resources";
ResourceBundle resourceBundle
= ResourceBundle.getBundle(DEFAULT_RESOURCE_PATH, locale);相对路径也可由绝对路径变通转化
然后在此 fully qualified base name of the resource bundle 所指定的路径下
放上标识语言所属的MyResources_xx.properties以及默认的MyResources.properties
即可自动对应吧
相对路径也可由绝对路径变通转化 getBundle attempts to locate a property resource file.
It generates a path name from the candidate bundle name by
replacing all "." characters with "/" and appending the string ".properties".
It attempts to find a "resource" with this name using ClassLoader.getResource. 貌似得从ClassLoader.getResource下手,再去看看