Renaming a project in IntelliJ IDEA
Solution 1:
You can change the project name, which is the name that is shown in the recent projects list, like so:
Go to Project Structure
(Ctrl+Alt+Shift+S) → Project Settings / Project → Project name:
Please note that this is not to be confused with name of the root module, or folder on the file system, which may or may not be similar.
Edit
Please try going into your .idea
folder in the project, create a file named .name
and enter a project name on a single line.
e.g.
my-new-project-name
Then restart IntelliJ.
This presumes you are using a folder-based Idea project in .idea
(rather than file based, with .iws file etc)
Solution 2:
Meanwhile I talk about IntelliJ 2016.2.
There are various names involved.
- Red the folder name. I.e., the folder where the project is located. This name appears the the project structure and in the path on the top window.
- Blue the name of the iml file. You can rename the iml file, when the iml file is different from the folder name, you have them both in the project view.
- Yellow the project name can be set as described by @vikingsteve (Project Structure (ctrl-alt-shift-s) -> Project Settings / Project -> Project name) in the response above. You will find the project name written in the file ".name" in the .idea folder. It is also the name which appears in the open recent file list.
- brown if your project is a maven project, you will additionally have the artifact id in the pom.
Usually all these names are the same which makes life easier.
Sometimes they are not. There are many reasons why they should be different. E.g., this helps me to differentiate project versions (I also use the image background feature of IntelliJ 2016.2) when I have simultaneously the same project on two branches.
While you change these names, IntellJ may generate a new *.iml with the artifactId name (brown). In this case just delete the *.iml file you don't want to keep.
Solution 3:
Following are the steps to be followed in IntelliJ Idea Community Edition:
Go to File >> Project Structure >> Project > Project Name Update project name with its new name.
Go to pom.xml Update project name with its new name in the
Select "Project" view and click root folder of the project then refactor its name.
Exit IntelliJ Idea and Rename root folder name in the windows directory structure where this project repository is stored.
Restart IntelliJ Idea and import the project using "Import project from existing resource" option.