I was earlier running my project using Java 1.7 but now I have to upgrade it to version 1.8. I have it installed as an alternative installation on my CentOS.
The location of Java8 is at /opt/jdk1.8.0_25/ and the current Java is at /usr/java/jdk1.7.0_67/. My system's JAVA_HOME also points to /usr/java/jdk1.7.0_67/.
As soon as I add the new SDK I get this error: Cannot Save Settings: Please specify a different SDK name.
How should I solve this issue?
This means you already have a SDK with this name (cause the messge key in jetbrains is : sdk.list.unique.name.required.error).
Remove the SDK before creating it once again.
To configure SDKs at the global (IDE) level
- Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
- In the left-hand pane, under Platform Settings, click SDKs.
- To add a new SDK, click add and select the desired SDK type.
- In the dialog that opens, select the SDK home directory and click OK.
As a result, a new SDK is added to IntelliJ IDEA, and its settings are shown on the SDK page in the right-hand part of the dialog.
- Optionally, edit the SDK name and contents.
- If necessary, add more SDKs as described above.
- Click OK in the Project Structure dialog.
To configure a project SDK
- Open the Project Structure dialog (e.g. Ctrl+Shift+Alt+S).
- In the left-hand pane, under Project Settings, click Project.
- On the page that opens in the right-hand part of the dialog, select the necessary SDK from the Project SDK list.
- If the desired SDK is not present in the list, click New and select the necessary SDK type.
- In the dialog that opens, select the SDK home directory and click OK.
As a result, a new SDK is added to IntelliJ IDEA and selected as the project SDK.
- To view or edit the SDK name and contents, click Edit. (The SDK page will open.)
- Click OK in the Project Structure dialog.
Source : IntelliJ IDEA 14.1.1 Help/Configuring Global, Project and Module SDKs