API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jottools. NewProject View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

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

package net.jottools;

import java.io.File;

/**
 * Helper to create a new Project
 * @author thibautc
 */
public class NewProject {
    public static void main(String[] args)
    {
        if(args.length<1)
        {
            System.err.println("Need the project name as an argument");
            return;
        }
        String name=args[1];
        name=name.trim();
        if(name.length()<1)
        {
            System.err.println("Need the project name as an argument");
            return;
        }
        File folder=new File(name);
        if(folder.exists())
        {
            System.err.println("There is already a file/folder called "+folder.getAbsolutePath()+" !!");
            return;
        }
        
        // create the project
        folder.mkdirs();
        new File(folder+File.separator+"lib").mkdirs();
    }
}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar