Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java URLÕýÔò±í´ïʽ

 ÍøÉÏתÌùµÄJavaÕýÔòºÜÈÃÈËʧÍû£¬Ò»ÆªJavaScriptÕýÔò¼¯Â¼±»ºÜ¶à²»¸ºÔðÈεÄÈËתÀ´×ªÈ¥£¬²¢´òÉÏJavaÕýÔòµÄ±êÌ⣬º¹£¬ÕæÊÇÀÃÈËÒ»¶Ñ¡£
// urlÕýÔò
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegularExpressionTest {

public static void main(String[] args) {

Pattern p = Pattern.compile("^(http|www|ftp|)?(://)?(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*((:\\d+)?)(/(\\w+(-\\w+)*))*(\\.?(\\w)*)(\\?)?(((\\w*%)*(\\w*\\?)*(\\w*:)*(\\w*\\+)*(\\w*\\.)*(\\w*&)*(\\w*-)*(\\w*=)*(\\w*%)*(\\w*\\?)*(\\w*:)*(\\w*\\+)*(\\w*\\.)*(\\w*&)*(\\w*-)*(\\w*=)*)*(\\w*)*)$",Pattern.CASE_INSENSITIVE );
Matcher m = p.matcher("http://www.qqgb.com/Program/Java/JavaFAQ/JavaJ2SE/Program_146959.html");

if(m.find()){
System.out.println(m.group());
}

m = p.matcher("http://baike.baidu.com/view/230199.htm?fr=ala0_1");

if(m.find()){
System.out.println(m.group());
}

m = p.matcher("http://www.google.cn/gwt/x?u=http%3A%2F%2Fanotherbug.blog.chinajavaworld.com%2Fentry%2F4550%2F0%2F&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8");

if(m.find()){
System.out.println(m.group());
}

m = p.matcher("http://zh.wikipedia.org:80/wiki/Special:Search?search=tielu&go=Go");

if(m.find()){
System.out.println(m.group());
}

}
}
ÔËÐнá¹û£º
http://www.qqgb.com/Program/Java/JavaFAQ/JavaJ2SE/Program_146959.html
http://baike.baidu.com/view/230199.htm?fr=ala0_1
http://www.google.cn/gwt/x?u=http%3A%2F%2Fanotherbug.blog.chinajavaworld.com%2Fentry%2F4550%2F0%2F&btnGo=Go&source=wax&ie=UTF-8&oe=UTF-8
http://zh.wikipedia.org:80/wiki/Special:Search?search=tielu&go=Go
˵Ã÷Õ⼸ÖÖÀàÐ͵ͼ¿ÉÒÔʶ±ð¡£ 
      //ÆäËûJavaÕýÔò¡¾×ª×Ôitpub¡¿ 
      01¡¢"^\\d+$"¡¡¡¡//·Ç¸ºÕûÊý£¨ÕýÕûÊý + 0£©
¡¡¡¡02¡¢"^[0-9]*[1-9][0-9]*$"¡¡¡¡//


Ïà¹ØÎĵµ£º

Using Google is AJAX Search API with Java ...

http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search ......

ʹÓÃJavaÔÚÎļþÀï²åÈëÒ»ÐÐ

ÔÚÎļþÀïÔö¼ÓÒ»ÐеÄΨһ·½·¨¾ÍÊǶÁȡԭʼÎļþ£¬È»ºóдÈëµ½Ò»¸öÁÙʱÎļþ£¬Í¬Ê±Ð´ÈëÒª²åÈëµÄÊý¾Ý¡£È»ºóɾ³ýԭʼÎļþ£¬ÔÙ°ÑÁÙʱÎļþ¸ÄÃûΪԭʼÎļþÃû¡£
package net.java2000.io; 
 
import java.io.BufferedReader; 
import java.io.File; 
import java.io.FileInputStream; 
import jav ......

JAVA ÅàѵÌâ¿â Spring

Ò»¡¢Spring»ù´¡ÖªÊ¶¼°IOC_Ñ¡ÔñÌâ
1. ÏÂÃæ¹ØÓÚspringÃèÊö´íÎóµÄÊÇ£º£¨ £©
A  SpringÖ§³Ö¿É²åÈëµÄÊÂÎñ¹ÜÀíÆ÷£¬Ê¹ÊÂÎñ»®·Ö¸üÇáËÉ£¬Í¬Ê±ÎÞÐè´¦Àíµ×²ãµÄÎÊÌâ¡£
B  SpringÊÂÎñ¹ÜÀíµÄͨÓóéÏó²ã»¹°üÀ¨JTA²ßÂÔºÍÒ»¸öJDBC DataSource¡£
C  ÓëJTA»òEJB CMTÒ»Ñù£¬SpringµÄÊÂÎñÖ§³ÖÒÀÀµÓÚJava EE»·¾³¡£
D  Spr ......

ÈÏʶjavaÖеÄÔËÐÐʱÒì³£

JavaÖÐÒì³£Ò»°ã·ÖΪ3À࣬ϱ߽éÉÜÏ£¬½ö½öÊǸöÈËÀí½â¡£
µÚÒ»ÖÖÊDZàÒëÆÚÒì³££¬»òÕß½Ðcheck Exception¡£
±àÒëÆÚÒì³£µÄÌØµã£º
1.ϵͳҪÇó±ØÐëÔÚ³ÌÐòÀï×ö³ö´¦Àí£¬·ñÔò±¨±àÒë´íÎ󣬱àÒëÎÞ·¨Í¨¹ý£¬Ò²¾ÍÊÇËµÏµÍ³Ç¿ÖÆÒªÇó´¦Àí£¬¶ÔÓÚ´¦Àí·½Ê½£¬²»ÍâºõÖ±½Ócatch´¦ÀíºÍÅ׳öµ½Íâ²ã£¬µ«ÊÇ×îÖÕ»¹ÊÇÒª´¦ÀíµÄ¡£
2.Óû§×Ô¶¨ÒåÒ»¸ö±àÒëÆÚÒ ......

JAVA»ñȡϵͳÐÅÏ¢

Properties props=System.getProperties(); //ϵͳÊôÐÔ
System.out.println("JavaµÄÔËÐл·¾³°æ±¾£º"+props.getProperty("java.version"));
System.out.println("JavaµÄÔËÐл·¾³¹©Ó¦ÉÌ£º"+props.getProperty("java.vendor"));
System.out.println("Java¹©Ó¦É̵ÄURL£º"+props.getProperty("java.vendor.url"));
Syste ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ