Class.forName is excellent
例:

Class.forName("weblech.util.Log4j");

在Log4j里定义一个静态类构造器,里面放apache log4j的初始代码。

其他如注册数据源、界面本地化。。。

Eclipse看代码是最爽的:
查看类的引用、代码导航

版权所有 罗明
posted on 2006-02-16 14:07 罗明 阅读(265) 评论(0)  编辑  收藏 所属分类: Java

只有注册用户登录后才能发表评论。


网站导航: