pnever      2004/09/23 07:14:04

  Modified:    proposals/tamino/src/store/org/apache/slide/store/tamino/tools
                        Tag: TWS421_BRANCH Tws.java
  Log:
  Ooops again ... :-)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.4.3   +18 -25    
jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/tools/Tws.java
  
  Index: Tws.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/tools/Tws.java,v
  retrieving revision 1.1.4.2
  retrieving revision 1.1.4.3
  diff -u -r1.1.4.2 -r1.1.4.3
  --- Tws.java  23 Sep 2004 13:49:40 -0000      1.1.4.2
  +++ Tws.java  23 Sep 2004 14:14:04 -0000      1.1.4.3
  @@ -260,39 +260,32 @@
       //--
       
       public static void main(String[] args) throws IOException {
  -        Tws[] tools;
  -        int i;
  -        File dir;
  -        File props;
  -        File jar;
  -        String nativeLib;
  -        Generator g;
  -        Properties env;
  -        String vmOpts;
  -        
  -        if (args.length != 5) {
  -            throw new IOException("illegal arguments, expected: dir properties jar 
vmargs nativeLib");
  +        if (args.length < 4 || args.length > 5) {
  +            throw new IOException("illegal arguments, expected: dir properties jar 
vmargs nativeLib (jvmopt.d64)");
           }
  -        dir = new File(args[0]).getAbsoluteFile();
  +        File dir = new File(args[0]).getAbsoluteFile();
           if (!dir.isDirectory()) {
               throw new IOException("directory not found: " + dir);
           }
  -        props = new File(args[1]).getAbsoluteFile();
  +        File props = new File(args[1]).getAbsoluteFile();
           if (!props.isFile()) {
               throw new IOException("launcher properties not found: " + props);
           }
  -        jar = new File(args[2]);
  +        File jar = new File(args[2]);
           if (!jar.isFile()) {
               throw new IOException("jar not found: " + jar);
           }
  -        nativeLib = args[3];
  -        String jvmopt_d64 = args[4];
  +        String nativeLib = args[3];
  +        String jvmopt_d64 = "";
  +        if (args.length == 5 && args[5].length() > 0) {
  +            jvmopt_d64 = args[5];
  +        }
           
  -        tools = createTools();
  -        env = new Properties();
  -        for (i = 0; i < tools.length; i++) {
  -            vmOpts = jvmopt_d64 + " -Dmain=" + tools[i].getClass().getName();
  -            g = new Generator(dir, PREFIX + tools[i].name, props, jar, env, vmOpts, 
nativeLib);
  +        Tws[] tools = createTools();
  +        Properties env = new Properties();
  +        for (int i = 0; i < tools.length; i++) {
  +            String vmOpts = jvmopt_d64 + " -Dmain=" + tools[i].getClass().getName();
  +            Generator g = new Generator(dir, PREFIX + tools[i].name, props, jar, 
env, vmOpts, nativeLib);
               g.run();
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to