|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
〔config.properties〕 [CMS properties] cmsServerName=cms cmsTemplateDirectoryName=template [time out:minute] time_out=300000 [administrator setting] administrator=SA admingroup=ADMINROLE [web path setting] innerresource=/AccessControl/jsp/innerresource/ [picture path setting] picturePath=C:/picture/ [log path setting] logPath=c:/log1/ ConfigBundle.java package creator.config; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * * <p>Title: ConfigBundle.java</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author TanBo * @version 1.0 */ public class ConfigBundle{ private static ResourceBundle bundle; /** * init() */ public ConfigBundle() { } /** * @function getString * @param s String * @return String */ public static String getString(String s){ String s1 = null; try{ s1 = getResourceBundle().getString(s); }catch(MissingResourceException missingresourceexception){ System.out.println("ConfigBundle:getString error!"+missingresourceexception.toString()); } return s1; } /** * @function getResourceBundle * @return ResourceBundle */ private static ResourceBundle getResourceBundle(){ if(bundle == null) bundle = ResourceBundle.getBundle("creator.config.config"); return bundle; } } 返回类别: 教程 上一教程: 集成 Struts、Tiles 和 JavaServer Faces 下一教程: Java认证宝典v1.0之SCJD篇 您可以阅读与"JAVA:配置文件读取器"相关的教程: · JAVA读取配置文件例子 · JAVA文件读取路径问与答 · 用java读写ini配置文件 · bug? Hbm2JavaTask无法实现joined-subclass单独配置文件(2.1.2) · JAVA实现远程文件读取 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |