JAVA²Ù×÷windows×¢²á±í
ÔÚÎÒÃÇд³ÌÐòµÄʱºò,ÓÐʱ»áÒªÇó±£´æÒ»Ð©Êý¾Ý,±ÈÈçÓû§Ãû»òÕß±ðµÄ,µ«ÊÇÕâÑùÊý¾ÝÓÖ²»ÊDZ£´æÔÚ³ÌÐòͬһĿ¼ÏÂ,ÕâÑù×öÌ«Ã÷ÏÔÁË,Ò²²»Ì«°²È«,ÄÇÔõô°ìÄØ?Õâ¸öʱºò,Èç¹ûÄܰÑÊý¾Ý±£´æµ½×¢²á±íÀïÃæÈ¥,ÄǸöàºÃ,Ò»À´Òþ±Î,¶þÀ´·½±ã,²»ÖÁÓÚÔÚ³ÌÐòĿ¼ÏÂÉú³ÉÒ»´óƬÎļþ.
ÔÚJAVAÀïÃæ,¿ÉÒÔÀûÓÃjava.util.prefs.PreferencesÀ´¶Ô×¢²á±í½øÐвÙ×÷,ÎÒÃÇÏÈ¿´Ò»ÏÂÀý×Ó°É
/*
* Test3.java
*
* Created on 2007-9-20, 18:41:41
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test1;
import java.util.prefs.Preferences;
/**
*
* @author hadeslee
*/
public class Test3 {
public static void main(String[] args)throws Exception {
Preferences pre=Preferences.systemNodeForPackage(Test3.class);
pre.put("userName", "hadeslee");
pre.putInt("age", 25);
pre.flush();
Preferences now=Preferences.systemNodeForPackage(Test3.class);
System.out.println(now.get("userName", "Ϊ¿Õ"));
System.out.println(now.getInt("age", 0));
}
}
ÕâÊÇÒ»¸ö×î¼òµ¥µÄÀý×Ó,µÚÒ»¾ä¾ÍÊǸù¾Ý°üµÃµ½Ò»¸ö½Úµã,È»ºó°ÑһЩֵ·Å½øÈ¥,¿ÉÒÔ·ÅString,boolean,int,long,float,doubleµÈÖµ ,Èç¹ûÄãÏë´æÈë¶ÔÏóµÄ»°,¿ÉÒ԰ѶÔÏóÐòÁл¯³Ébyte[],È»ºóÔÙ´æ½øÀ´,È»ºó¶ÁÒ²ÊÇÒ»ÑùµÄ,ÎÒÃÇÕâÑù²Ù×÷¾ÍÏñÊÇÔÚ²Ù×÷Ò»¸öMapÒ»¸ö,ËùÓеÄÖµ¶¼ÊÇ´æÔÚÕâ¸öÓ³ÉäÀïÃæ.
ÄÇôËüÃDZ£´æÔÚÄÄÀïÄØ?
Èç¹ûÑ¡µÄÊÇsystemNode...Ôò±£´æÔÚ[HKEY_LOCAL_MA
Ïà¹ØÎĵµ£º
ÔÚJ2ME¿ª·¢ÖУ¬Ïß³ÌÊÇÒ»¸öÐèÒª·Ç³£ÖØÊÓµÄÎÊÌ⣬ÏÂÃæÊÇÒ»¶Î¹ØÓÚÏ̵߳ÄÎÄÕ¡£ÎÒÈÏΪ¶Ô´òºÃÏ̻߳ù±¾ºÜÓаïÖú¡£
zz
http://www.j2medev.com/Article/ShowArticle.asp?ArticleID=5478
Ò»¡¢Í¬²½ÎÊÌâÌá³ö
Ï̵߳Äͬ²½ÊÇΪÁË·ÀÖ¹¶à¸öÏ̷߳ÃÎÊÒ»¸öÊý¾Ý¶ÔÏóʱ£¬¶ÔÊý¾ÝÔì³ÉµÄÆÆ»µ¡£
ÀýÈ磺Á½¸öÏß³ÌThreadA¡¢Threa ......
Reflection ÊÇ Java ³ÌÐò¿ª·¢ÓïÑÔµÄÌØÕ÷Ö®Ò»£¬ËüÔÊÐíÔËÐÐÖÐµÄ Java ³ÌÐò¶Ô×ÔÉí½øÐмì²é£¬»òÕß˵“×ÔÉ󔣬²¢ÄÜÖ±½Ó²Ù×÷³ÌÐòµÄÄÚ²¿ÊôÐÔ¡£ÀýÈ磬ʹÓÃËüÄÜ»ñµÃ Java ÀàÖи÷³ÉÔ±µÄÃû³Æ²¢ÏÔʾ³öÀ´¡£
Java µÄÕâÒ»ÄÜÁ¦ÔÚʵ¼ÊÓ¦ÓÃÖÐÒ²ÐíÓõò»ÊǺܶ࣬µ«ÊÇÔÚÆäËüµÄ³ÌÐòÉè¼ÆÓïÑÔÖиù±¾¾Í²»´æÔÚÕâÒ»ÌØÐÔ¡£ÀýÈ磬Pascal¡¢C ......
ÔÚÎÒÃÇÔÚд³ÌÐòµÄ¹ý³ÌÖÐ,ÓÐЩʱºòÐèÒªÖªµÀһЩµçÄÔµÄÓ²¼þÐÅÏ¢,±ÈÈçÎÒÃÇдһЩÐèҪע²áµÄ³ÌÐòµÄʱºò,¾ÍÐèÒªµÃµ½Ä³¸öµçÄÔÌØ¶¨µÄÐÅÏ¢,Ò»°ãÀ´Ëµ,Íø¿¨µÄÎïÀíµØÖ·ÊDz»»áÖØ¸´µÄ,ÎÒÃÇÕýºÃ¿ÉÒÔÓÃËüÀ´×öΪÎÒÃÇʶ±ðһ̨µçÄԵıêÖ¾.ÄÇÈçºÎµÃµ½Íø¿¨µÄÎïÀíµØÖ·ÄØ?ÎÒÃÇ¿ÉÒÔ½èÖúÓÚProcessBuilderÕâ¸öÀà,Õâ¸öÀàÊÇJDK1.5мӵÄ,ÒÔǰҲ¿ÉÒÔÓÃRu ......
1.·½·¨ÖØÔØ£ºÊÇÖ¸ÔÚÒ»¸öÀàÖÐÓжà¸ö·½·¨µÄÃû×ÖÏàͬ£¬µ«ÕâЩ·½·¨µÄ²ÎÊý±ØÐ벻ͬ£¬¼´ÒªÃ´ÊDzÎÊýµÄ¸öÊý²»Í¬£¬ÒªÃ´ÊDzÎÊýµÄÀàÐͲ»Í¬
×¢Ò⣺ÔÚ·½·¨ÖØÔØÖУ¬·½·¨µÄ·µ»ØÀàÐͺͲÎÊýµÄÃû×Ö²»²ÎÓë±È½Ï
2.·½·¨ÖвÎÊýµÄ´«Öµ£ ......