java»ñÈ¡µ±Ç°Â·¾¶
java»ñÈ¡µ±Ç°Â·¾¶
1¡¢ÀûÓÃSystem.getProperty()º¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
System.out.println(System.getProperty("user.dir"));//user.dirÖ¸¶¨Á˵±Ç°µÄ·¾¶
2¡¢Ê¹ÓÃFileÌṩµÄº¯Êý»ñÈ¡µ±Ç°Â·¾¶£º
File directory = new File("");//É趨Ϊµ±Ç°Îļþ¼Ð
try{
System.out.println(directory.getCanonicalPath());//»ñÈ¡±ê×¼µÄ·¾¶
System.out.println(directory.getAbsolutePath());//»ñÈ¡¾ø¶Ô·¾¶
}catch(Exceptin e){}
File.getCanonicalPath()ºÍFile.getAbsolutePath()´óÔ¼Ö»ÊǶÔÓÚnew File(".")ºÍnew File("..")Á½ÖÖ·¾¶ÓÐËùÇø±ð¡£
# ¶ÔÓÚgetCanonicalPath()º¯Êý£¬“."¾Í±íʾµ±Ç°µÄÎļþ¼Ð£¬¶ø”..“Ôò±íʾµ±Ç°Îļþ¼ÐµÄÉÏÒ»¼¶Îļþ¼Ð
# ¶ÔÓÚgetAbsolutePath()º¯Êý£¬Ôò²»¹Ü”.”¡¢“..”£¬·µ»Øµ±Ç°µÄ·¾¶¼ÓÉÏÄãÔÚnew File()ʱÉ趨µÄ·¾¶
# ÖÁÓÚgetPath()º¯Êý£¬µÃµ½µÄÖ»ÊÇÄãÔÚnew File()ʱÉ趨µÄ·¾¶
±ÈÈ統ǰµÄ·¾¶Îª C:\test £º
File directory = new File("abc");
directory.getCanonicalPath(); //µÃµ½µÄÊÇC:\test\abc
directory.getAbsolutePath(); //µÃµ½µÄÊÇC:\test\abc
direcotry.getPath(); //µÃµ½µÄÊÇabc
File directory = new File(".");
directory.getCanonicalPath(); //µÃµ½µÄÊÇC:\test
directory.getAbsolutePath(); //µÃµ½µÄÊÇC:\test\.
direcotry.getPath(); //µÃµ½µÄÊÇ.
File directory = new File("..");
directory.getCanonicalPath(); //µÃµ½µÄÊÇC:\
directory.getAbsolutePath(); //µÃµ½µÄÊÇC:\test\..
direcotry.getPath(); //µÃµ½µÄÊÇ..
ÁíÍ⣺System.getProperty()ÖеÄ×Ö·û´®²ÎÊýÈçÏ£º
System.getProperty()²ÎÊý´óÈ«
# java.version Java Runtime Environment version
# java.vendor &nbs
Ïà¹ØÎĵµ£º
Ìâ¼Æ£ºÕâÀï¸ø³öjava½âÎöxml£¬ÒÔ°ïÖúÈËÃÇÀí½âÐí¶àÈÝÆ÷ÊÇÔõô×öµÄ¡£¡£Ïñspring£¬strutsµÈ.
1.mysql.xml´úÂ룺
<?xml version="1.0" encoding="UTF-8"?>
<data>
<datasource>
<servername>localhost</servername>
<serverport>3306</serverport>
<databasen ......
¡¡ÕýÔò±í´ïʽÔÚ×Ö·û´®´¦ÀíÉÏÓÐ×ÅÇ¿´óµÄ¹¦ÄÜ£¬sunÔÚjdk1.4¼ÓÈëÁ˶ÔËüµÄÖ§³Ö
¡¡
¡¡¡¡ÏÂÃæ¼òµ¥µÄ˵ÏÂËüµÄ4ÖÖ³£Óù¦ÄÜ£º
¡¡¡¡
¡¡¡¡²éѯ£º
¡¡¡¡
ÒÔÏÂÊÇ´úÂëƬ¶Î£º
String str="abc efg ABC";
String regEx="a|f"; //±íʾa»òf
Pattern p=P ......
ÒÔÏÂÊÇ Java ÅжÏ×Ö·û´®ÊÇ·ñΪ¿ÕµÄÈýÖÖ·½·¨.
·½·¨Ò»: ×î¶àÈËʹÓõÄÒ»¸ö·½·¨, Ö±¹Û, ·½±ã, µ«Ð§ÂʺܵÍ.
·½·¨¶þ: ±È½Ï×Ö·û´®³¤¶È, ЧÂʸß, ÊÇÎÒÖªµÀµÄ×îºÃÒ»¸ö·½·¨.
·½·¨Èý: Java SE 6.0 ²Å¿ªÊ¼ÌṩµÄ·½·¨, ЧÂʺͷ½·¨¶þ¼¸ºõÏàµÈ, µ«³öÓÚ¼æÈÝÐÔ¿¼ÂÇ, ÍƼöʹÓ÷½·¨¶þ.
ÒÔÏ´úÂëÔÚÎÒ»úÆ÷ÉϵÄÔËÐнá¹û: (»úÆ÷ÐÔÄܲ»Ò», ½ö¹ ......
Ê×ÏÈ£¬×öÒ»µã˵Ã÷¡£FlexÊDz»ÄÜÖ±½ÓÁ¬½ÓÊý¾Ý¿âµÄ£¬ÕâÒ»µã´ó¼ÒÐèÒªÖªµÀ£¬ËüÖ»Äܼä½ÓµØÁ¬½ÓÊý¾Ý¿â¡£FlexÖÐÌṩÁËÈýÖÖ·½Ê½£ºHttpService£¬WebService ºÍRemoteObject¡£ÆäÖÐHttpService¿ÉÒÔÖ±½Ó»ñÈ¡XMLÖеÄÊý¾Ý£¬»¹¿ÉÒÔͨ¹ýJSP,ASPÒÔ¼°PHP¶ÁÈ¡Êý¾Ý¿âÖеÄÊý¾Ý£¬Õâ¸ö±È½Ï¼òµ¥£¬¶øÇÒÍøÉÏÒ²ÓкܶàÀý×Ó£¬ÎҾͲ»¶à˵ÁË¡£WebServiceÎÒ²» ......
¹Ø¼ü×Ö: axis
ÓÉÓÚûѧϰ¹ý.net
£¬×î½ü³ÌÐòÖÐÐèÒªµ÷ÓÃ.net
µÄwebservice
½Ó¿ÚµÃµ½Ò»ÕÅͼƬ¡£ÔÚÍøÉÏÕÒÁ˺öà×ÊÁÏÑ¡ÓõÄaxisÀ´ÊµÏÖµ÷Óá£
Ê×ÏÈ¿´¿´.net
ʵÏÖWebmehodµÄÁ½ÖÖ·½Ê½£¬ÕâÁ½ÖÖ·½Ê½java
´«²ÎÊýµÄ·½Ê½Ò²Óв»Í¬
1.rpc·½Ê½£º
Java
´úÂë
using System;
using& ......