java¶ÁÈ¡propertiesÊôÐÔÎļþÖµ·½·¨
ÔÚʹÓÃhibernate»òÕßspringµÄʱºò£¬ÎÒÃÇÍùÍùͨ¹ýÅäÖÃÎļþÅäÖÃÊý¾Ý¿âÁ¬½ÓÊôÐÔ¡£µ«Õâ´ÎÏîÄ¿Öв¢Ã»ÓÐÓõ½hibernateºÍspring£¬Ö»Óõ½ÁËstruts2¡£ÒªÈçºÎʵÏÖͨ¹ý¶ÁÈ¡ÎļþÅäÖûñÈ¡ÊôÐÔÖµÄØ£¿ResourceBundleÕâ¸öÀà¿ÉÊÇʵÏÖ¶ÁÈ¡propertiesÎļþÀ´»ñÈ¡Öµ
ÔÚjavaÖУº
public final static Object initLock = new Object();
private final static String DRIVERNAME = "driverName"; //driverNameÊÇpropertiesÎļþÖж¨ÒåµÄ
private final static String URL = "url";
private final static String USER = "user";
private final static String PASSWORD = "password";
private final static String PROPERTIES_FILE_NAME = "property";
private static ResourceBundle bundle = null;
private static String driverName;
private static String url;
private static String user;
private static String password;
static{
try{
if(bundle ==null){
synchronized (initLock) {
if(bundle == null)
bundle = ResourceBundle.getBundle(PROPERTIES_FILE_NAME,Locale.CHINA);
}
}
driverName = bundle.getString(DRIVERNAME).trim();
url = bundle.getString(URL).trim();
user = bundle.getString(USER).trim();
password = bundle.getString(PASSWORD).trim();
}catch(Exception e){
System.out.println("¶ÁÈ¡×ÊÔ´Îļþproperty_zh.propertiesʧ°Ü!");
}
}
ÔÚ.propertiesÎļþÖУº
driverName=com.mysql.jdbc.Driver
url=xxxxx\:3307/9zgame?
user=root
password=xxxxxx
ÎļþÃû×ÖΪ£ºproperty_zh.properties¡£ºózh¸ù¾ÝLocale.CHINAÒ»Öµģ¬Èç¹ûLocale.ENGLISH£¬ÔòÎļþÃûΪ£ºproperty_en.properties
Ïà¹ØÎĵµ£º
ÔÚEclipseÖÐÎÒÃǾ³£»áÏòÖ÷·½·¨×¢Èë²ÎÊý£¬ÒÔÌṩ¸ø³ÌÐòµÄÔËÐУ¬Æä·½·¨ÈçÏ£º
1.µãÔËÐа´Å¥£¨»òÓÒ»÷ÒªÔËÐеÄÀࣩ
2.µã»÷Open Run Dialog..
3.Ñ¡ÖÐ×ó²àÐèÒªÔËÐеÄÀà
4.ÔÚÓÒ²àÑ¡ÖÐArgument
5.ÔÚProgram ArgumentÖÐÊäÈëÄãҪעÈëµ½Ö÷º¯ÊýÖеIJÎÊý
6.µã»÷ÔËÐУ¨Run£©£¬¾Í¿ÉÒÔÔËÐÐÁË¡£¡£¡£ ......
¶¹¶¹Íø ¼¼ÊõÓ¦ÓÃƵµÀ 2009Äê06ÔÂ10ÈÕ ¡¾×ֺţºÐ¡ÖÐ´ó¡¿ Êղر¾ÎÄ
JProfiler memcached JavaCC EclEmma Jester Java¼ÓÃܼ¼Êõ£¨Æߣ©¡£
¡¡¡¡ECC
¡¡¡¡ECC-Elliptic Curves Cryptography£¬ÍÖÔ²ÇúÏßÃÜÂë±àÂëѧ£¬ÊÇÄ¿Ç°ÒÑÖªµÄ¹«Ô¿ÌåÖÆÖУ¬¶Ôÿ±ÈÌØËùÌṩ¼ÓÃÜÇ¿¶È×î¸ßµÄÒ»ÖÖÌåÖÆ¡£ÔÚÈí¼þ×¢²á ......
×î½üÔÚдjava²âÊÔ³ÌÐòµÄʱºòͻȻÓöµ½ÁËÒ»¸öÎÊÌ⣺javaĬÈÏ°üÖеÄpublicÀàÊDz»ÄÜÔÚÆäËû°üÖÐÖ±½Óµ÷ÓõÄ
Ê×ÏÈ£¬×ܽáÒ»ÏÂĬÈÏ°üÖÐÀàµÄʹÓ÷¶Î§£¬javaĬÈÏ°üÖеÄÀà¿ÉÒÔʵÀý»¯ÆäËü°üÖеÄpublicÀ࣬µ«ÊÇÆäËü°üÖеÄÀàÊDz»ÄÜÏÔʽʵÀý»¯Ä¬ÈÏ°üÖеÄÀàÕâ¸öÌØÐÔÔÚJDK1.4ÒÔºóµÄ°æ±¾³ÉÁ¢£»
& ......
Èç¹û˵½ñÄêJava¿ª·¢Æ½Ì¨ÓÐʲô´óʶù£¬ÄǾÍÒªÊý½«ÓÚÄêµ×·¢²¼µÄJava 7ÁË¡£½øÈë2010Ä꣬Java 7ÓÐÄÄЩеĽøÕ¹?ÕâЩеÄÌØÐÔ¸üжÔÎÒÃÇÓÐÄÄЩºÃ´¦?¸ÃÈçºÎʹÓÃ?Java 7µÄÐÔÄÜÈçºÎ?±¾ÎĽ«¸øÄã´ð°¸¡£
ÕâÀïµÄÄÚÈÝÖ÷Òª°üÀ¨Æä×î иüС¢Ò»Ð©´úÂëʵÀý¡¢¸úÒÔÇ°°æ±¾µÄJava½øÐÐÐÔÄܱȽÏÐèÒª²Î¿¼µÄһЩ»ù×¼¡¢ÒÔ¼°Ê²Ã´Ê±ºòËü²Å»á·¢²¼µÈÐÅÏ ......
JavaÅäÖÃÎļþ¶ÁÈ¡Óи÷ÖÖ²»Í¬µÄÎļþ£¬µ«ÊÇÓÉÓÚ´ò°üJarºóµÄ·¾¶¸Ä±ä£¬ÍùÍùÔÚÏîÄ¿ÖÐÄÜÕýÈ·¶ÁÈ¡µÄÅäÖÃÎļþÔÚJarºó±ä³ÉÎļþ²»´æÔڵı¾ß£¬ÏÂÔÚÌá³ö¼¸¸÷²»Í¬µÄÅäÖÃÎļþ¶ÁÈ¡·½Ê½£¬½ö¹©²Î¿¼
Ò»¡¢Ö±½ÓÎļþ¶ÁÈ¡
File f = new File("you config file path");
FileReader fr = new FileReader(f);
BufferReader br = new ......