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

Java´´½¨¡¢ÖØÃüÃû¡¢É¾³ýÎļþºÍÎļþ¼Ð

package my.file;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
public class TravelAllFile {
public static void main(String[] args) {
String path = "E:/Îļþ¼Ð";
File f = new File(path);
if (f.isDirectory()) {
new TravelAllFile().getFileName(f);
}

delFolder("E:/Îļþ¼Ð");
System.out.println("deleted");
}

// µÝ¹é²éÕÒº¯Êý£¬²ÎÊýΪfile¶ÔÏó
public void getFileName(File f) {
// File Êý×é
File[] files = f.listFiles();
for (int i = 0; i < files.length; i++) {
// µÝ¹é³ö×ÓĿ¼
if (files[i].isDirectory()) {
System.out.println("×ÓĿ¼ÊÇ£º" + files[i].getName());
getFileName(files[i]);
// µÝ¹é³ö×ÓÎļþ
} else {
System.out.println(files[i].getName());
}
}
}
//ÖØÃüÃû
public void rename(){
File fl=new File("E:\\Îļþ¼Ð"); // ÕâÀïдÉÏ·¢Ìæ»»µÄÎļþ¼Ð·¾¶,×¢ÒâʹÓÃ˫б¸Ü
String[] files=fl.list();
File f=null;
String filename="";
for(String file:files)
{
f=new File(fl,file);// ×¢Òâ,ÕâÀïÒ»¶¨ÒªÐ´³ÉFile(fl,file)Èç¹ûд³ÉFile(file)ÊÇÐв»Í¨µÄ,Ò»¶¨ÒªÈ«Â·¾¶
filename=f.getName();
// System.out.println(filename);
f.renameTo(new File(fl.getAbsolutePath()+"\\"+filename.replace("ÒªÌæ»»µôµÄÄÚÈÝ", "Ìæ»»³ÉµÄÄÚÈÝ")));// ÕâÀï¿ÉÒÔ·´¸´Ê¹ÓÃreplaceÌæ»»,µ±È»Ò²¿ÉÒÔʹÓÃÕýÔò±í´ïʽÀ´Ìæ»»ÁË

}
}

//ɾ³ýÎļþ¼Ð
//param folderPath Îļþ¼ÐÍêÕû¾ø¶Ô·¾¶
public static void delFolder(String folderPath) {
try {
delAllFile(folderPath); //ɾ³ýÍêÀïÃæËùÓÐÄÚÈÝ
String filePath = folderPath;
filePath = filePath.toString();
java.io.File myFilePath = new java.io.File(filePath);
myFilePath.delete(); //ɾ³ý¿ÕÎļþ¼Ð
} catch (Exception e) {
e.printStackTrace();
}
}
//ɾ³ýÖ¸¶¨Îļþ¼ÐÏÂËùÓÐÎļþ
//param path Îļþ¼ÐÍêÕû¾ø¶Ô·¾¶
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;


Ïà¹ØÎĵµ£º

Java ÒÀÀµ×¢É乿·¶£¨JSR

JCP SE/EE Ö´ÐÐίԱ»á
Õýʽ½ÓÊÜÁË
JSR 330
—— Dependency Injection for Java¡£¸Ã¹æ·¶ÓÚ ½ñÄê 5 Ô 9 ÈÕ
ÓÉ Google µÄ Bob Lee ÒÔ¼° SpringSource µÄ Rod Johnson ×÷Ϊ¹æ·¶Áìµ¼Ìá½»¸ø JCP£¬ÏÖÔÚÒѾ­Õýʽ·¢²¼£¬²»µÃ²»¸Ð̾¸Ã¹æ·¶±ê×¼»¯¹ý³ÌÖ®¿ì¡£ÔÚ ×îÖÕͶƱ½á¹ûÖÐ
£¬14 Ʊͨ¹ý£¬1 ƱδͶ£¬1 Ʊ·´¶Ô¡£
J ......

JavaÐéÄâ»ú ºÍ javaÐéÄâ»úϵĽø³Ì

Ò»¡¢Ê²Ã´ÊÇJavaÐéÄâ»ú
     µ±Äã̸µ½JavaÐéÄâ»úʱ£¬Äã¿ÉÄÜÊÇÖ¸£º
     1¡¢³éÏóµÄJavaÐéÄâ»ú¹æ·¶
     2¡¢Ò»¸ö¾ßÌåµÄJavaÐéÄâ»úʵÏÖ
     3¡¢Ò»¸öÔËÐеÄJavaÐéÄâ»úʵÀý
¶þ¡¢JavaÐéÄâ»úµÄÉúÃüÖÜÆÚ
     Ò»¸öÔËÐÐ ......

Serializable javaÐòÁл¯

Bean Serializable Interface µÄ½Ó¿ÚÈÃBEAN¿ÉÒÔ´®Ðл¯£¬½«Æä±ä³ÉÒ»¸ö¿É±£´æÎªÒÔºóʹÓõĶþ½øÖÆÁ÷¡£µ±Ò»¸öBEAN±»ÏµÁл¯µ½´ÅÅÌÉÏ»òÕ߯äËûÈκεط½£¬Æä״̬±»±£´æÆðÀ´£¬ÆäÖеÄÊôÐÔÖµÒ²²»»á¸Ä±ä¡£ÔÚBEANµÄ¹æ·¶ÖУ¬JSP²¢Ã»ÓÐÒªÇóBEANʵÏÖSerializable½Ó¿Ú¡£µ«ÊÇ£¬Èç¹ûÄúÏ£Íû×Ô¼º¿ØÖÆÄúËù´´½¨µÄ×é¼þµÄserialization½ø³Ì£¬»òÕßÄúÏë ......

Oracle ÓëÔÚJavaÖеÄÁ´½Ó

תÌû´¦£ºhttp://dong-java.javaeye.com/blog/375150 
1¡£ÍƼöʹÓÃOralce±È½ÏеÄ10.2.0.3 JDBC Drivers¡£Õâ¸ö°æ±¾¶Ô±È9.2µÄ×î´óµÄºÃ´¦ÊÇDriverManager.setLoginTimeoutº¯ÊýÊÇÆð×÷Óõġ£ÉèÖÃÁËÕâ¸ö²ÎÊý£¬ÔÚ¶ñÁÓµÄÍøÂç»·¾³ÖоͲ»»áÓÐÁ¬½ÓÊý¾Ý¿âµÄº¯Êý³¤Ê±¼ä²»·µ»ØµÄÇé¿ö¡£
2¡£JDBC Developer!ˉs Guide and Refer ......

Javaģʽ֮µ¥Àýģʽ

¼òµ¥µÄ˵µ¥Àý¾ÍÊÇ Ö»ÄÜÓÐÒ»¸öʵÀý£¬ËùÒԵط½Óõ½µÄʵÀý¶¼ÊÇͬһ¸ö¡£
¾ÍºÃÏñ¼ÒÈ˳Է¹£¬×À×ÓÊǵ¥ÀýµÄ£¬´ó¼ÒÓõÄÊÇͬһ¸ö¡£¶øÍëÊǶàÀýµÄ£¬Ã¿È˶¼ÓÐ×Ô¼¸µÄ¡£ ÏÂÃæÊǾßÌåµÄÀý×Ó£º
Javaģʽ֮µ¥Àýģʽ£º
          µ¥Àýģʽȷ±£Ò»¸öÀàÖ»ÓÐÒ»¸öʵÀý£¬×ÔÐÐÌṩÕâ¸öʵÀý²¢ÏòÕû¸öÏµÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ