Java¶Áȡע²á±íÐÅÏ¢µ½ÄÚ´æÖÐ
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @description ±¾³ÌÐòʵÏÖÁ˶Áȡע²á±í·ÖÖ§£ºHKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sourcesµ½ÄÚ´æµÄ²Ù×÷
* @author:narsh
* @time 2010-2-8
*/
public class getRegToMemery {
public static void main(String []args){
try {
Process ps = null;
ps = Runtime
.getRuntime()
.exec(
"reg query \"HKEY_CURRENT_USER\\Software\\ODBC\\ODBC.INI\\ODBC Data Sources\"");
ps.getOutputStream().close();
InputStreamReader i = new InputStreamReader(ps.getInputStream());
String line;
BufferedReader ir = new BufferedReader(i);
while ((line = ir.readLine()) != null) {
System.out.println(line);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Ïà¹ØÎĵµ£º
Ò»Ìáµ½Ï̺߳ÃÏñÊǼþºÜÂé·³ºÜ¸´ÔÓµÄÊ£¬ÊÂʵÉÏȷʵÈç´Ë£¬Éæ¼°µ½Ï̵߳ıà³ÌÊǺܽ²¾¿¼¼Çɵġ£Õâ¾ÍÐèÒªÎÒÃDZ任˼ά·½Ê½£¬Á˽âÏ̻߳úÖÆµÄ±È½ÏͨÓõļ¼ÇÉ£¬Ð´³ö¸ßЧµÄ¡¢²»ÒÀÀµÓÚij¸öJVMʵÏֵijÌÐòÀ´¡£±Ï¾¹½ö½ö¾ÍJava¶øÑÔ£¬¸÷¸öÐéÄâ»úµÄʵÏÖÊDz»Í¬µÄ¡£Ñ§Ï°Ïß³Ìʱ£¬×îÁîÎÒÓ¡ÏóÉî¿ÌµÄ¾ÍÊÇÄÇÖÖ²»È·¶¨ÐÔ¡¢Ã»Óб£ÕÏÐÔ£¬¸÷¸öÏ̵߳ÄÔËÐÐÍ ......
Á´±íLinkedListÊÇÓÉÈô¸É¸ö³ÆÎª½áµãµÄ¶ÔÏó×é³ÉµÄÒ»ÖÖÊý¾Ý½á¹¹£¬Ã¿¸ö½áµãº¬ÓÐÒ»¸öÊý¾ÝºÍÏÂÒ»¸ö½áµãµÄÒýÓ㬻òº¬ÓÐÒ»¸öÊý¾Ý²¢º¬ÓÐÉÏÒ»¸ö½áµãµÄÒýÓúÍÏÂÒ»¸ö½áµãµÄÒýÓà LinkedListÀàÔÚjava.util°üÖÐ
1.¹¹Ôì·½·¨£ºLinkedList()
2.³£Ó÷½·¨
public boolean add(Object o)£ºÏòÁ´±íÌí¼ÓÒ»¸ ......
ËùÓÐJava
ÐéÄâ»úÖÐʹÓõÄÊý¾Ý¶¼ÓÐÈ·¶¨µÄÊý¾ÝÀàÐÍ£¬Êý¾ÝÀàÐͺͲÙ×÷¶¼ÔÚJava
ÐéÄâ»ú¹æ·¶ÖÐÑϸñ¶¨Òå¡£Java
ÖеÄÊý¾ÝÀàÐÍ·ÖΪÔʼÊý¾ÝÀàÐÍ £¨primitive types
£©ºÍÒýÓÃÊý¾ÝÀàÐÍ£¨reference type
£©¡£ÒýÓÃÀàÐÍÒÀÀµÓÚʵ¼ÊµÄ¶ÔÏ󣬵«²»ÊǶÔÏó±¾Éí¡£ÔʼÊý¾ÝÀàÐͲ»ÒÀÀµÓÚÈκζ«Î÷£¬ËüÃǾÍÊDZ¾Éí±íʾµÄÊ ......
»¨ÁËÒ»¸ö¶àÔÂÓÃJava NIOдÁËÒ»¸ö¶¨ÖƵÄHTTP Server£¬Ö÷ÒªÊÇÖ§³ÖÎÒµÄWeBuzz.IMÍøÒ³°æÁÄÌì·þÎñ
¡£
ÏȽéÉÜÒ»ÏÂWeBuzz.IMÍøÒ³ÁÄÌì·þÎñ¡£
WeBuzz.IM
ÊÇÒ»¿îÍøÒ³°æ¼´Ê±ÁÄÌ칤¾ß£¬ÓÃÓÚ°ïÖúÓû§Í¨¹ýÍøÒ³ºÍÅóÓÑÁÄÌì¡£Gtalk£¨Google Talk£©
¡¢MSN£¨Windows Live Messenger£©
¡¢Yahoo! Messenger£¨Yahoo! Chat£¬ÓÖ³ÆÎªÑÅ»¢Í¨£©
......
ÏÂÔØ dom4j-1.6.1.jar¡£
1: package org.zzp.common.xml.dom4j;
2:
3: import java.io.FileWriter;
4: import java.io.IOException;
5: import org.dom4j.Document;
6: import org.dom4j.DocumentHelper;
7: import org.dom4j.Element;
8: import org.dom4j.io.OutputFormat;
9: impor ......