Phpstorm Jdk



  • In this video, I will show you how to setup the Java Development Kit, download and install Intellij IDEA IDE 17.1 and create a Java Hello World Program.For t.
  • JDK 1.7 from Oracle is not officially supported yet and has known problems that stop us from using it by default. Oracle JDK 1.7.040 has added support for Retina and works much better than previous versions on Mac. You are welcome to give it a try in case you have any problems with Apple JDK.

Specify the Project SDK based on the Java 8 JDK. This SDK will be the default JRE used to run Gradle, and the JDK version used to compile the plugin Java sources. When targeting 2020.3 and later only, using Java 11 is now required, please see blog post. In the Additional Libraries and Frameworks panel, select Java and IntelliJ Platform Plugin. I've checked the phpstorm.sh file and I cannot see any definition of PHPSTORMJDK in that script. I also can't find any phpstorm.jdk anywhere in my HOME folder.

IntelliJ IDEA supports a fully-functional integration with Maven that helps you automate your building process. You can easily create a new Maven project, open and sync an existing one, add a Maven support to any existing IntelliJ IDEA project, configure and manage a multi-module project.

If you want to use a custom Maven version that is not bundled with IntelliJ IDEA, you need to install it locally.

Create a new Maven project

  1. If no project is currently open in IntelliJ IDEA, click New Project on the Welcome screen. Otherwise, select File | New | Project from the main menu.

  2. Select Maven from the options on the left.

  3. Specify project's SDK (JDK) or use the default one and an archetype if you want to use a predefined project template (configure your own archetype by clicking Add Archetype ).

    Click Next.

  4. On the next page of the wizard, specify the following Maven coordinates that are added to the pom.xml file:
    • GroupId- a package of a new project.

    • ArtifactId- a name of your project.

    • Version- a version of a new project. By default, this field is specified automatically.

    For more information on Maven coordinates, see Maven naming conventions.

    Click Next.
  5. If you are creating a project using a Maven archetype, IntelliJ IDEA displays the Maven settings that you can use to set the Maven home directory and Maven repositories. Also, you can check the archetype properties.

    Click Next.

  6. Specify the name and location settings.

    Click Finish.

    IntelliJ IDEA creates a Maven project with the pom.xml file that includes compiler and target versions of Java, dedicated Maven tool window, and all the necessary dependencies to start you work.

    The version of Java specified in the pom.xml file overrides the version specified in the JDK for Importer option, located in the Maven settings.

Create a Java EE project with Maven as a build tool

  1. Launch the New Project wizard. If no project is currently opened in IntelliJ IDEA, click New Project on the welcome screen. Otherwise, select File | New | Project from the main menu.

  2. Select Java Enterprise from the options on the left.

  3. Leave the default option Maven as your build tool and click Next.

  4. On the next page of the wizard, select additional libraries and frameworks for your project and click Next.

  5. On the next page of the wizard, specify your project's name, location, and artifact coordinates. Click Finish.

    IntelliJ IDEA creates a Maven project with the dedicated Maven tool window and adds necessary dependencies.

    For the more detailed information, refer to Tutorial: Your first Java EE application.

Open an existing Maven project

  1. From the main menu, select File | Open.

    Alternatively, click Open on the welcome screen.

    If you have some custom plugins that require you to import your project from the IntelliJ IDEA model, press Ctrl+Shift+A and search for the Project from Existing Sources action.

  2. In the dialog that opens, select the pom.xml file of the project you want to open.

    Click OK.

  3. In the dialog that opens, click Open as Project.

IntelliJ IDEA opens and syncs the Maven project in the IDE. If you need to adjust importing options when you open the project, refer to the Maven settings.

If you have a Maven project with the configured Maven wrapper then IntelliJ IDEA will take the Maven version from the maven.properties file.

Configure the Maven settings before opening a new project

You can configure IntelliJ IDEA to display Maven settings before you open a new Maven project. Since these are application-level settings, they are applied to any new project you open.

  1. On the Welcome screen, select Customize | All Settings.

    Alternatively, from the main menu, select File |New Project Settings | Preferences for New Projects.

  2. In the Settings/Preferences dialog, select Build, Execution, Deployment | Build Tools | Maven.

  3. In the Maven settings dialog, select the Show settings dialog for new Maven projects.

  4. Click OK to save the changes.

    Next time you open a new project, IntelliJ IDEA displays the Maven Settings dialog where you can specify a location of the local Maven repository and a user settings file.

Add a new Maven module to an existing project

You can add a Maven module to the project in which you are already working.

JdkPhpstorm Jdk
  1. In the Project tool window, right-click the project folder and select New | Module. Alternatively, from the main menu, select File| New | Module to open the New Module wizard.

  2. If you used main menu to add a module then the process of adding a module is the same as Creating a new Maven project.

    If you are adding sub modules by right-clicking the root folder then the process of adding a new module is shorter. You need to specify the name of your module in the Name field. The rest of the information is added automatically and you can use either the default settings or change them according to your preferences.

Project Jdk Not Defined Intellij

Configure a multi-module Maven project

You can create a multi-module Maven project in IntelliJ IDEA. The multi-module project is defined by a parent POM file with several sub modules.

If you have the Maven version 3.7 or later installed, IntelliJ IDEA will support importing a project from the MNG-6656 model.

In this case when you open a child POM file in the editor, you don't have to specify a version inside the parent tags if it is located in the relativePath by default. If you add a dependency to a module in the same project, you don't have to specify a version of the dependent module.

  1. Create a Maven parent project. IntelliJ IDEA creates a standard Maven layout including an src folder.

  2. In the Project tool window, remove the src folder since you would only need it in the very rare cases. For your general project, you don't need the src folder for the parent POM.

  3. In the Project tool window, right-click your project (or from the main menu, click File) and select New | Module to add a sub project.

  4. In the New Module wizard following the instructions on how to add a module, specify the necessary information and click Finish.

    The src folder is created automatically and you can open POM and add a packaging that you need. IntelliJ IDEA adds the module to the parent project. IntelliJ IDEA also adds name and the description of the sub project to the parent POM.

    In a multi-module project, the parent POM needs to have a pom packaging.

    Last, but not least, IntelliJ IDEA adds the description of the parent POM to the sub project's POM.

    You can click in the left gutter to quickly open the parent POM from your sub project.
  5. You can also add dependencies to the parent POM that will be inherited by the sub projects.
  6. Open Maven tool window to see that all changes made in the parent POM are reflected in sub projects.

Access the Maven settings

Use the Maven settings to configure options such as Maven version, local repository, offline mode, and so on.

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Build, Execution, Deployment| Maven.

    Click on the toolbar, in the Maven tool window to access the Maven settings.

  2. On the Maven settings page, configure the available options and click OK to save the changes.

Use the Maven wrapper or a custom version of Maven

  1. For a custom version, Download the needed Maven version on your computer.

  2. From the main menu select File | Settings/Preferences | Build, Execution, Deployment |Build Tools | Maven.

  3. On the Maven settings page, in the Maven home directory field, specify the location of the Maven custom version installation. For the Maven wrapper, select the use Maven wrapper option from the list. In this case the version of Maven defined in the .mvn/wrapper/maven-wrapper.properties file will be used.

  4. Click OK.

Change the JDK version in a Maven project

There are several places where you can change the JDK version that will affect not only your current project, but the whole application as well.

Jdk

Changing the JDK version in the Project Structure dialog will only affect the current project.

  1. From the main menu, select File | Project StructureCtrl+Alt+Shift+S.

  2. In the dialog that opens, in Project SDK, specify the JDK version and click OK to save the changes.

When IntelliJ IDEA runs Maven goals, it will use the JDK version specified for the Maven runner. By default, IntelliJ IDEA uses the project's JDK.

Changing the JDK for the Maven runner will only affect the current project.

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Build, Execution, Deployment | Maven | Runner.

  2. On the page that opens, in the JRE field, select the JDK version.

Phpstorm Keyboard Shortcuts

Changing the JDK version for the Maven importer will affect the whole application since it is a part of the Maven global settings. If you want to use the same JDK version as you use in your project for syncing or resolving dependencies, change the JDK version for the importer.

Change Project Jdk Intellij

  1. In the Settings/Preferences dialog Ctrl+Alt+S, go to Build, Execution, Deployment | Maven | Importing.

  2. On the page that opens, in the JDK for importer field, select the same JDK version as you used in the Project Structure and click OK to save the changes.