2011-02-28 34 views

回答

0

什麼樣的應用程序,網絡應用程序?獨立位置?

如果它是一個web應用程序,你使用WTP或eclipse之外的應用服務器嗎?

無論如何,如果月食沒有看到你所有的修改,您可以在JRebel的看一看: http://www.zeroturnaround.com/jrebel/

+0

我是尋找其他方式:Eclipse能夠注意到這些變化並進行代碼替換。但我希望**應用程序**能夠注意哪些類已被替換。 – 2011-03-14 07:38:36

0

試試這個: 店上次更改日期

// use commons-io 
Collection<File> files = FileUtils.listFiles(new File("/path/to/files"), null, true); 

Map<File, Long> lastModifiedDates = new HashMap<File, Long>(files.size()); 
for (File file : files) { 
    lastModifiedDates.put(file, file.lastModified()); 
} 

,並檢查對於修改:

// inside a loop (probably a TimerTask) 

for (Map.Entry<File, Long> entry : lastModifiedDates.entrySet()) { 
    if (entry.getKey().lastModified() > entry.getValue()) { 
     // do something 
    } 
} 
相關問題