Creating/opening .Java file

I was wondering if it's possible to create and open a .Java file in the IntelliJ IDE, from the source code in the IDE. I am wanting to prompt the user to put in a name of a file and would like to create the file and then open it in the IDE.
1 comment
Comment actions Permalink

You can use com.intellij.psi.JavaDirectoryService to create various top-level Java elements/files. offers generic way of creating (.java) file with any content.


Please sign in to leave a comment.