window-->Preference-->java-->CodeStyle-->CodeTemplates-->Code-->New Java Files
在Patten里面输入你的类型,比如:
/* * $$RCSfile: ${file_name},v $$ * $$Revision: 1.1 $$ * $$Date: ${date} $$ * * Copyright (C) 2005 Bettem, Inc. All rights reserved. * * This software is the proprietary information of Bettem, Inc. * Use is subject to license terms. */ ${filecomment} ${package_declaration} ${typecomment} /** * <p>Title: ${type_name}</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * @author lihan * @version 1.0 */ ${type_declaration} 则新建java文件时候:
/* * $RCSfile: OracleCon.java,v $ * $Revision: 1.1 $ * $Date: 2009-2-16 $ * * Copyright (C) 2005 Bettem, Inc. All rights reserved. * * This software is the proprietary information of Bettem, Inc. * Use is subject to license terms. */ package dao; /** * <p>Title: OracleCon</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * @author lihan * @version 1.0 */ public class OracleCon { public static void main(String[] args) { } }