Integrating Jelastic with IntelliJ IDEA: The Java IDE for Professional Developers
IntelliJ IDEA is a code-centric IDE focused on developer productivity. The editor deeply understands your code and knows its way around the codebase, makes great suggestions right when you need them, and is always ready to help you shape your code.
This Java IDE is provided within the following edition types:
- Ultimate is the full-featured commercial IDE with a complete set of tools and integrations with the most important modern technologies and frameworks needed for effective Web and Java EE development
- Community is an open-source version of the IDE that is used for JVM and Android development
To explore the topic in more details, read the guide below where we’ll describe Jelastic integration with IntelliJ IDEA through the following steps:
- Install Jelastic Plugin
- Access Jelastic from IDEA
- Deploy Application to Jelastic
- Work with Environments and Log Files
- Create Web Project
Install Jelastic IntelliJ IDEA Plugin
To install Jelastic plugin, launch your IDEA, navigate to Settings > Plugins and click Browse repositories.
Access Jelastic from IDEA
To access Jelastic from your IDEA, navigate to Settings > Jelastic, type your account credentials (email & password) and select your Jelastic provider from the list.
Deploy Application to the Cloud
After installing the plugin, you can see a button with Jelastic logo in the main IDEA toolbar or in the pop-up menu for the Projects tool window. Click this button to deploy your Java web project to Jelastic.
In the opened window, choose the appropriate artifact (.ear, .jar or .war archive), state the Context, select the destination environment from the list and confirm your choice.
Work with Environments and View Log Files
The Jelastic Tool Window in IDEA displays a list of your current environments that you can expand to see the added nodes and deployed applications.
Using context menu, you can manage your environment (Stop/Start, Restart/Refresh) and deployed project (Destroy, Open in browser or Refresh).
To see log files of a container, click on a destination node and select the Get logs option. Choose the file you are interested in and click View log (or just double-click the required file).
Create Web Project in IDEA
You can create your own IDEA project and deploy it directly to Jelastic environment by following the next steps.
1. Choose Java Module to create your new project, fill in all required fields and click Next.
2. Select the desired technologies, namely, Web Application since your project should support this framework and click Finish. When the project is created, the default artifact will be generated, which is an exploded WAR package with executable files and static pages.
3. Select the required artifact and tick the Build on make checkbox that allows to generate the current artifact each time after building the project.
4. For deploying to the server a new EAR, JAR or WAR artifact should be created with the Build on make option enabled.
5. When the project is configured and the code is written, the only thing left is to click Make Project. At this point, the artifacts are built and ready for deployment that you can run as described in the previous section.
6. To launch your application, click Open in browser on the menu for the appropriate context. As a result, your application will be opened in a new browser tab.
That’s it! In such a way, you can create your Java application via IntelliJ IDEA of either Ultimate or Community edition and deploy it to Jelastic Cloud all in one place, without the necessity to interrupt the development process.
Have any questions or suggestions on integrating IntelliJ IDEA with Jelastic? Feel free to get in touch with our technical experts at Stackoverflow.