惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
F
Full Disclosure
A
About on SuperTechFans
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
量子位
Know Your Adversary
Know Your Adversary
K
Kaspersky official blog
L
LINUX DO - 热门话题
Recorded Future
Recorded Future
C
Cisco Blogs
M
MIT News - Artificial intelligence
T
Tenable Blog
G
GRAHAM CLULEY
月光博客
月光博客
Recent Announcements
Recent Announcements
V
Visual Studio Blog
IT之家
IT之家
T
The Exploit Database - CXSecurity.com
The GitHub Blog
The GitHub Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
P
Privacy International News Feed
P
Proofpoint News Feed
I
Intezer
博客园 - 叶小钗
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
小众软件
小众软件
Hacker News - Newest:
Hacker News - Newest: "LLM"
O
OpenAI News
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic
The Cloudflare Blog
Spread Privacy
Spread Privacy
酷 壳 – CoolShell
酷 壳 – CoolShell
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
B
Blog RSS Feed

博客园 - yiling

Eclipse 12大使用技巧 Hibernate 缓存的使用 Quartz应用 Solaris9下安装Oracle10g详细过程(转) Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream - yiling 使用JOX实现JavaBean和XML之间的转化 java读取property文件 db2常用命令 ant中利用macrodef来定义可重用的task [转]Oracle exp imp sybase备份服务(backup server)不能启动的处理方法 SQL*PLUS环境输入'&字符'的方法 DB2 Catalog hibernate如何设置一对多cascade Hibernate 一些疑点(转的文章,还不错) Ajax客户端与伺服端之间,使用XML作为数据传送 从找实习的过程中发现了自己的弱点 (转)CAD二次开发简介 WID实施过程中的常见问题
java查看文件的创建时间 - yiling - 博客园
yiling · 2009-04-14 · via 博客园 - yiling

不说别的直接上代码。

try{
    Process   p   =   Runtime.getRuntime().exec("cmd /c dir c:\\db2jcc.jar");  
      
             InputStream   is   =   p.getInputStream();  
             BufferedReader   br   =   new   BufferedReader(new   InputStreamReader(is));  
             String   result;  
             String   getTime   =   null;  
             while   ((result   =   br.readLine())   !=   null)   {  
                     if(result.endsWith("db2jcc.jar"))   {  
                             getTime   =   result.substring(0,11);  
                             break;  
                     }  
             }  
             System.out.println("file create time is "+getTime);    
       
  }
  catch (Exception e)
  {
   System.out.println(e.toString());
  }