java ɾ³ýÎļþ¼°Ä¿Â¼
javaÖÐɾ³ýĿ¼ÊÂÏÈҪɾ³ýĿ¼ÏµÄÎļþ»ò×ÓĿ¼¡£Óõݹé¾Í¿ÉÒÔʵÏÖ¡£
public void del(String filepath) throws IOException{
File f = new File(filepath);//¶¨ÒåÎļþ·¾¶
if(f.exists() && f.isDirectory()){//ÅжÏÊÇÎļþ»¹ÊÇĿ¼
if(f.listFiles().length==0){//ÈôĿ¼ÏÂûÓÐÎļþÔòÖ±½Óɾ³ý
f.delete();
}else{//ÈôÓÐÔò°ÑÎļþ·Å½øÊý×飬²¢ÅжÏÊÇ·ñÓÐϼ¶Ä¿Â¼
File delFile[]=f.listFiles();
int i =f.listFiles().length;
for(int j=0;j<i;j++){
if(delFile[j].isDirectory()){
del(delFile[j].getAbsolutePath());//µÝ¹éµ÷ÓÃdel·½·¨²¢È¡µÃ×ÓĿ¼·¾¶
}
delFile[j].delete();//ɾ³ýÎļþ
}
}
del(filepath);//µÝ¹éµ÷ÓÃ
}
Ïà¹ØÎĵµ£º
java¶àÏ̱߳à³Ì×ܽ᣺
http://lavasoft.blog.51cto.com/62575/27069
Java¹Ø¼ü×Öfinal¡¢staticʹÓÃ×ܽá
:
http://xo-tobacoo.javaeye.com/blog/374282
¡¡¡¡1.public
¡¡¡¡¡¡¡¡Ê¹ÓöÔÏó£ºÀà¡¢½Ó¿Ú¡¢³ÉÔ±
¡¡¡¡¡¡¡¡½éÉÜ£ºÎÞÂÛËüËù´¦Ôڵİü¶¨ÒåÔÚÄÄ£¬¸ÃÀࣨ½Ó¿Ú¡¢³ÉÔ±£©¶¼ÊǿɷÃÎʵÄ
¡¡¡¡2.private
¡¡¡¡¡¡¡¡Ê¹ÓöÔÏó ......
1£ºÏȶÔһЩ¸ÅÄîµÄÀí½â£º
JDBC£ºJava DataBase Connection
±¾¼¾Ä¿±ê
1¡¢JDBCµÄ·ÖÀà
2¡¢JDBCµÄÖ÷Òª²Ù×÷ÀàºÍ½Ó¿Ú£º
DriverManager¡¢Connection¡¢Statement¡¢PreparedStatement¡¢ResultSet
3¡¢ÈçºÎʹÓÃJDBCÁ¬½ÓMySQLÊý¾Ý¿â
www.mldn.cnÉÏÓÐMYSQLµÄ½Ì³Ì¡£
1¡¢Ê²Ã´ÊÇJDBC£¿
JDBCÊÇJAVAÌṩµÄÒ»¸ö·þÎñ£¬×¨ÃÅÓÃÓÚ·ÃÎÊ ......
import java.io.IOException;
public class test {
/**
* ±àÂë
* @param filecontent
* @return String
*/
public static String encode(byte[] bstr){
return new sun.misc.BASE64Encoder().encode(bstr);
}
/**
* ½âÂë
* @param filecontent
* @return string
*/
public static ......
ÅäÖÃjava»·¾³±äÁ¿£º JAVA_HOME£ºÅäÖÃJDKµÄĿ¼ CLASSPATH£ºÖ¸¶¨µ½ÄÄÀïÈ¥ÕÒÔËÐÐʱÐèÒªÓõ½µÄÀà´úÂ루×Ö½ÚÂ룩 PATH£ºÖ¸¶¨¿ÉÖ´ÐгÌÐòµÄλÖà LINUXϵͳ£¨ÔÚ" .bash_profile "ÏµĻ·¾³±äÁ¿ÉèÖã© ......
¡¡1¡¢FACTORY—×·MMÉÙ²»ÁËÇë³Ô·¹ÁË£¬Âóµ±À͵靈áºÍ¿ÏµÂ»ùµÄ¼¦³á¶¼ÊÇMM°®³ÔµÄ¶«Î÷£¬ËäÈ»¿ÚζÓÐËù²»Í¬£¬µ«²»¹ÜÄã´øMMÈ¥Âóµ±ÀÍ»ò¿ÏµÂ»ù£¬Ö»¹ÜÏò·þÎñԱ˵“À´Ëĸö¼¦³á”¾ÍÐÐÁË¡£Âóµ±ÀͺͿϵ»ù¾ÍÊÇÉú²ú¼¦³áµÄFactory
¡¡¡¡¹¤³§Ä£Ê½£º¿Í»§ÀàºÍ¹¤³§Àà·Ö¿ª¡£Ïû·ÑÕßÈκÎʱºòÐèҪijÖÖ²úÆ·£¬Ö»ÐèÏò¹¤³§ÇëÇó¼´¿É¡£Ïû· ......