资源简介

在线考试系统 考务管理 swing java 源代码

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

package classes;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Date;
import javax.swing.JOptionPane;


/**
 *
 * @author Administrator
 */
public class AddLog {

 public static void addlog(String error)//将错误信息写入日志
    {
        FileWriter fw=null;
        BufferedWriter bw=null;
        File logFile=null;
        String containt=(new Date()).toString()+“\t\t“+error;
        try {
            logFile = new File(“datalog.zhoujian“);
            if (!logFile.exists()) {
                logFile.createNewFile();//如果该日志文件不存在,则新建一个
            }
            fw=new FileWriter(logFiletrue);//以追加的模式操作文件
            bw=new BufferedWriter(fw);
bw.newLine();
                        bw.newLine();
bw.write(containt);
bw.close();
                fw.close();

        }
        catch (IOException ex) {
            JOptionPane.showMessageDialog(null“写入日志文件出错!““严重警告“JOptionPane.ERROR_MESSAGE);
        }finally{

        }



    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件          0  2010-12-27 18:24  在线考试系统\examSystem\build\classes\.netbeans_automatic_build

     文件       1446  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\AddLog.class

     文件       3062  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\DbAccess.class

     文件       2128  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\ExamPaper.class

     文件       1517  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\ExamPlan.class

     文件         17  2010-12-27 18:24  在线考试系统\examSystem\build\classes\classes\examPlan.rs

     文件       2977  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Person.class

     文件       2332  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Question.class

     文件       2773  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\QuestionType.class

     文件         21  2010-12-27 18:24  在线考试系统\examSystem\build\classes\classes\QuestionType.rs

     文件       1060  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\QuestionTypeSet.class

     文件         24  2010-12-27 18:24  在线考试系统\examSystem\build\classes\classes\QuestionTypeSet.rs

     文件       4743  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Score.class

     文件       6148  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Student.class

     文件       2733  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Subject.class

     文件       5056  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\Teacher.class

     文件        661  2011-01-07 09:09  在线考试系统\examSystem\build\classes\classes\test.class

     文件        697  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$1.class

     文件        697  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$2.class

     文件        729  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$3.class

     文件        729  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$4.class

     文件        729  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$5.class

     文件        729  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login$6.class

     文件       6385  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Login.class

     文件       1285  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\Main.class

     文件        993  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\StudentExaming$1.class

     文件        763  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\StudentExaming$10.class

     文件        795  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\StudentExaming$11.class

     文件        763  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\StudentExaming$12.class

     文件        763  2011-01-07 11:55  在线考试系统\examSystem\build\classes\examsystem\StudentExaming$13.class

............此处省略218个文件信息

评论

共有 条评论