Index: trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java
===================================================================
--- trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java	(revision 1704)
+++ trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java	(revision 1712)
@@ -98,5 +98,5 @@
 
     private HashMap<VirtualKey, Integer> modifiers;
-    
+
     private StructureNode lastMouseClickEvent;
     private StructureNode lastFocusChangeEvent;
@@ -110,5 +110,5 @@
     @Override
     public String help() {
-        return "generateJacaretoReplay <filename> <sequences>";
+        return "generateJacaretoReplay <filename> <sequences> <class> <basepath> <classpathext> {<initclass>}";
     }
 
@@ -123,10 +123,21 @@
         String filename;
         String sequencesName;
+        String classpath;
+        String basepath;
+        String classpathext;
+        String initclass = "";
         try {
             filename = (String) parameters.get(0);
             sequencesName = (String) parameters.get(1);
+            classpath = (String) parameters.get(2);
+            basepath = (String) parameters.get(3);
+            classpathext = (String) parameters.get(4);
         }
         catch (Exception e) {
             throw new IllegalArgumentException();
+        }
+
+        if (parameters.size() > 5) {
+            initclass = (String) parameters.get(5);
         }
 
@@ -151,6 +162,6 @@
         modifiers.put(VirtualKey.ALT_GRAPH, 32);
         currentKeyModifiers = 0;
-        
-        writeJacaretoXML(sequences, filename);
+
+        writeJacaretoXML(sequences, filename, classpath, initclass, basepath, classpathext);
     }
 
@@ -160,5 +171,10 @@
     }
 
-    private void writeJacaretoHead(BufferedWriter writer) throws IOException {
+    private void writeJacaretoHead(BufferedWriter writer,
+                                   String classname,
+                                   String initclass,
+                                   String basepath,
+                                   String classpathext) throws IOException
+    {
         writeLine(writer, "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
         writeLine(writer, "<JacaretoStructure>");
@@ -170,5 +186,5 @@
         // application starter details need to be changed for general cases.
         writeLine(writer,
-                  "<Calendar procTime=\"0\" duration=\"0\" year=\"2014\" month=\"8\" date=\"11\" hour=\"14\" min=\"43\" sec=\"41\" uuid=\"06831ba1-f28a-4e05-b46e-ce9d8f9ffa0f\" />");
+                  "<Calendar procTime=\"0\" duration=\"0\" year=\"2000\" month=\"1\" date=\"11\" hour=\"1\" min=\"1\" sec=\"1\" uuid=\"06831ba1-f28a-4e05-b46e-ce9d8f9ffa0f\" />");
         writeLine(writer,
                   "<SystemInfo procTime=\"0\" duration=\"0\" screenWidth=\"2646\" screenHeight=\"1024\" javaVersion=\"1.7.0_65\" lookAndFeel=\"javax.swing.plaf.metal.MetalLookAndFeel\" uuid=\"720f430f-52cf-4d8b-9fbe-58434f766efe\" />");
@@ -176,6 +192,19 @@
                   "<KeyboardState procTime=\"0\" duration=\"0\" isNumLockOn=\"false\" isScrollLockOn=\"false\" isCapsLockOn=\"false\" applyIsNumLockOn=\"true\" applyIsScrollLockOn=\"true\" applyIsCapsLockOn=\"true\" uuid=\"28146f79-9fc7-49f9-b4a8-5866a7625683\" />");
         writeLine(writer, "<ComponentMode numberPopupMenues=\"true\" />");
-        writeLine(writer,
-                  "<ApplicationStarter procTime=\"0\" duration=\"0\" name=\"HelloWorldSwing\" class=\"HelloWorldSwing\" initclass=\"\" basepath=\"/home/daniel/project/autoquest-jfcmonitor\" classpathext=\"${basepath}/helloswing.jar;${basepath}/.;\" detectDuration=\"false\" captureparams=\"\" replayparams=\"\" uuid=\"a7b7d7b9-caa9-4d6d-b052-cf74d353275e\" />");
+        //@formatter:off
+        writeLine(writer, "<ApplicationStarter "
+            + "procTime=\"0\" "
+            + "duration=\"0\" "
+            + "name=\"Autoquest Replay\" "
+            + "class=\"" + classname + "\" "
+            + "initclass=\"" + initclass + "\" " 
+            + "basepath=\"" + basepath + "\" "
+            + "classpathext=\"" + classpathext + "\" "
+            + "detectDuration=\"false\" "
+            + "captureparams=\"\" "
+            + "replayparams=\"\" "
+            + "uuid=\"a7b7d7b9-caa9-4d6d-b052-cf74d353275e\" />"
+        );
+        //@formatter:on
     }
 
@@ -257,9 +286,15 @@
     }
 
-    private void writeJacaretoXML(Collection<List<Event>> sequences, String filename) {
+    private void writeJacaretoXML(Collection<List<Event>> sequences,
+                                  String filename,
+                                  String classpath,
+                                  String initclass,
+                                  String basepath,
+                                  String classpathext)
+    {
         BufferedWriter writer = new BufferedWriter(openReplayFile(filename + ".xml"));
 
         try {
-            writeJacaretoHead(writer);
+            writeJacaretoHead(writer, classpath, initclass, basepath, classpathext);
             writeJacaretoEvents(writer, sequences);
             writeJacaretoTail(writer);
@@ -455,5 +490,5 @@
 
         applyKeyModifier(info.getKey(), jacId == 401);
-        
+
         //@formatter:off
         writeLine(writer,
@@ -490,7 +525,6 @@
             return String.valueOf((char)keyCode);
         }
-        else {
-            return "_NO_LEGAL_XML_CHAR";
-        }
+
+        return "_NO_LEGAL_XML_CHAR";
     }
     
