| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
共有 609 人关注过本帖
标题:getProperty的问题
取消只看楼主 加入收藏
しΟν∈→鱈
Rank: 1
等 级:新手上路
威 望:2
帖 子:369
专家分:0
注 册:2006-10-25
收藏
 问题点数:0 回复次数:1 
getProperty的问题

String outputDirectory = System.getProperty("survey.dir"); 
//getProperty这个方法API上说返回这个KEY所对应该的值,如果没则返回NULL
(如果有是返回路径? 那是什么的路径?  是所有名为survey的路径?还是什么意思  感觉有点不清楚)

File outputFile = null;

if(outputDirectory != null) {

outputFile = new File(outputDirectory, "survey.out");
System.out.println("outputFile is not null");
}
else {
outputFile = new File("survey.out");
System.out.println("outputFile is null");
}

PrintWriter fileOut = new PrintWriter(
new FileWriter(outputFile.getAbsolutePath(), true));


开开心心的过&玩每一天!!!!
2007-01-10 20:02
しΟν∈→鱈
Rank: 1
等 级:新手上路
威 望:2
帖 子:369
专家分:0
注 册:2006-10-25
收藏
得分:0 
哦  我去试试  自已加个这个属性。。

开开心心的过&玩每一天!!!!
2007-01-10 21:19
快速回复:getProperty的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013383 second(s), 8 queries.
Copyright©2004-2025, BC-CN.NET, All Rights Reserved