PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(targetdir,"Version.java"))));
PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(getTargetDir(),"Version.java"))));
  public void writeFile() {    try {      PrintWriter filelist = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(targetdir,"version.gen"))));      filelist.println("Version.java");      filelist.close();      PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(targetdir,"Version.java"))));    out.println("/*\n"+                " * <copyright>\n"+                " * Copyright 1997-2000 Defense Advanced Research Projects Agency (DARPA)\n"+                " * and ALPINE (A BBN Technologies (BBN) and Raytheon Systems Company\n"+                " * (RSC) Consortium). This software to be used in accordance with the\n"+                " * COUGAAR license agreement.  The license agreement and other\n"+                " * information on the Cognitive Agent Architecture (COUGAAR) Project can\n"+                " * be found at http://www.cougaar.org or email: info@cougaar.org.\n"+                " * </copyright>\n"+                " */");      out.println();      out.println("// source machine generated at "+new java.util.Date()+" - Do not edit");      out.println("/* @"+"generated */");      out.println();      out.println("package org.cougaar;");      if (version == null) version = "unknown";      out.println("public final class Version {\n"+                  "  public final static String version = \""+version+"\";\n"+                  "  public final static long buildTime = "+System.currentTimeMillis()+"L;\n"+                  "}");      out.close();    } catch (Exception e) {      e.printStackTrace();    }  }