java ²Ù×÷×¢²á±í
import java.util.prefs.*;
public class Registery {
String[] keys = {"oa"};
String[] values = {"reg"};
//°ÑÏàÓ¦µÄÖµ´¢´æµ½±äÁ¿ÖÐÈ¥
public void writeValue() {
// HKEY_LOCAL_MACHINE\Software\JavaSoft\prefsÏÂдÈë×¢²á±íÖµ.
Preferences pre = Preferences.systemRoot().node("/javaplayer");
for (int i = 0; i < keys.length; i++) {
pre.put(keys[i], values[i]);
}
}
//¶ÁÈ¡±äÁ¿
public String readValue() {
// HKEY_LOCAL_MACHINE\Software\JavaSoft\prefs϶Áȡע²á±íÖµ.
Preferences pre = Preferences.systemRoot().node("/javaplayer");
return pre.get("oa", "def");
}
public static void main(String[] args) {
Registery reg = new Registery();
reg.writeValue();
System.out.println(reg.readValue());
}
}
Ïà¹ØÎĵµ£º
JavaµÄÊý¾Ý½á¹¹ÓÐÄÄЩ£¿MapÓëSetµÄ±¾ÖÊÇø±ðÊÇʲô£¿
·ÖÎö£ºJava³£¼ûµÄÊý¾Ý½á¹¹ÓÐCollectionºÍMap£¬ÆäÖÐCollection½Ó¿ÚÏ°üÀ¨ListºÍSet½Ó¿Ú£¬ÆäÏÂÓÖÓжà¸öʵÏÖÀàÈçListÏÂÓÐArrayList¡¢LinkedListºÍVectorµÈʵÏÖÀ࣬SetÏÂÓÐHashSet¡¢LinkedSetµÈʵÏÖÀàºÍSortedSet½Ó¿Ú£¬HashSetÏÂÓÐLinkedHashSet×ÓÀ࣬SortedSet½Ó¿ÚÏÂÓÐTre ......
ÕûÌåϵͳ²ÉÓÃJavaÖÐSpring ,Struts, Hibernate×é³É¡£
ÔÚActionÖУº
public ActionForward orgview(ActionMapping mapping, ActionForm form,HttpServletRequest request,HttpServletResponse response) {
// TODO Auto-generated method stub
ActionForward forward = new ActionForward("strpath");
Http ......
¿´µ½Ò»µÀjavaÌ⣬¸Ð¾õºÜ²»´í,ÎÒÔÚÔÀ´µÄ°æ±¾ÉÏÔö¼ÓÁËЩ´úÂ룬һÆðÀ´¿´¿´ÏÂÃæµÄ´úÂ뽫Êä³öʲô
class Father{
int i,j;
Father(){
add(1);
}
void add(int v){
i+=v;
j+=v;
}
void print(){
System.out.println("i:="+i);
System.out.println("j:="+j);
}
}
class C ......
ÍøÉÏJAVAµ÷ÓÃDLLµÄÎÄÕ²»ÉÙÁË£¬µ«·¢ÏÖÓÐЩ»¹ÊÇÓÐÎÊÌâ¡£¸ÕºÃÑо¿ÁËһϣ¬ÉÔ×ö¸ü¸Äºó£¬ÔÚVC2005ÉϲâÊÔͨ¹ý£¬£¨ReleaseºÍDebug°æ±¾¾ù¿É£©¡£
¸ü¸Äµã£º
1¡¢#include "jni.h"
2¡¢½«jni_md.hÖеģº#define JNICALL __stdcall±äΪ£º#define JNICALL __cdecl (º¯ÊýʹÓõÄÓ¦¸ÃÊÇcÓïÑÔµÄȱʡµ÷Ó÷½Ê½_cdecl·½Ê½£¬·ñÔòDLLÀ ......
±¾ÎÄÀ´×ÔºÍÄãÔÚÒ»ÆðµÄ²©¿Í£¬ÔÎıêÌ⣺¡¶JVMµ÷ÓÅ×ܽá(¶þ)-һЩ¸ÅÄî¡·¡£±¾ÎÄ×ܽáÁËJVM¸ÅÄîÖеÄJava¶ÔÏóµÄ´óС£¬ÒÔ¼°ÈýÖÖÒýÓÃÀàÐ͵Ķ¨ÒåÓëÇø·Ö¡£ »ù±¾Êý¾ÝµÄÀàÐ͵ĴóСÊǹ̶¨µÄ£¬ÕâÀï¾Í²»¶à˵ÁË¡£¶ÔÓÚ·Ç»ù±¾ÀàÐ͵ÄJava¶ÔÏó£¬Æä´óС¾ÍÖµµÃÉÌȶ¡£ ÔÚJavaÖУ¬Ò»¸ö¿ÕObject¶ÔÏóµÄ´óСÊÇ8byte£¬Õâ¸ö´óСֻÊDZ£´æ¶ÑÖÐÒ»¸öûÓÐÈÎ ......