How to create new project by passing the folder name to the Project class method?

I need to create a project in intellij from the ide through java where I will be passing the project name  and it needs to be created in the existing location

4 comments
Comment actions Permalink

Pallavi,

I'm not sure what your exact problem is. Can you please rephrase your question and provide some source code of what you have tried?

0
Comment actions Permalink

I am yet to try Jakub Chrzanowski :).. I have no clue on how can I achieve this requirement. 

Currently we have created a plugin project using swings in intellij. Now the requirement is I will be having the path name which will be the location of the project and a project name which we receive through the plugin application. I just need to create a new intellij project through code by passing the path name and project name.. how can we achieve this?

0
Comment actions Permalink
public class NewProject {
public static void main(String[] args) throws IOException {

//3rd process
File directory = new File("./data");
System.out.println(directory.getCanonicalPath());
ProjectManager.getInstance().createProject("hello", Paths.get("").toAbsolutePath().toString());
}

}

THe above is throwing me classNotfoundException
0
Comment actions Permalink
classNotfoundException

for which class? Can you paste the full stacktrace?

0

Please sign in to leave a comment.