IntelliJ IDEA – Cannot connect to the Maven process

In the IntelliJ IDEA, clicks on the download sources, and it shows the error Cannot connect to the Maven process. Terminal Cannot connect to the Maven process. Try again later. If the problem persists, check the Maven Importing JDK settings and restart IntelliJ IDEA Tested with IntelliJ IDEA 2022.2.1 (Community Edition) Build #IC-222.3739.54, built on …

Read more

How to decompile class in Java

This article shows how to decompile Java class in Eclipse IDE, IntelliJ IDEA, and command line. Table of contents 1. Java Decompilers 2. Decompile Java class in Eclipse IDE 3. Decompile Java class in IntelliJ IDEA 4. Decompile Java class in Command Line (FernFlower) 5. References 1. Java Decompilers Java decompiler can convert .class files …

Read more

Python support in IntelliJ IDEA

This article shows you how to make IntelliJ IDEA support and run Python. P.S Make sure Python SDK is installed, later we need to link this Python SDK to IntelliJ IDEA. 1. Plugins In IntelliJ IDEA. File -> Settings -> Plugins. 2. Python Community Edition Clicks Marketplace, search python, install the Python Community Edition by …

Read more

How to generate serialVersionUID in Intellij IDEA

In IntelliJ IDEA, we need to enable this auto-generate serialVersionUID option manually. P.S Tested with IntelliJ IDEA 2019.3.4, it should work the same in other versions. Intellij IDEA Settings File -> Settings -> Editor -> Inspections -> Java -> Serialization issues: Find serialization class without serialVersionUID and check it. Back to the editor, clicks on …

Read more

How to change the IntelliJ IDEA JDK version?

This article shows you how to update the IntelliJ IDEA to use the new JDK 13. 1. On the menu, clicks File -> Project Structure 2. Platform Settings -> SDKs, add and point to the JDK 13 installed folder. 3. Project Settings -> Project, change both Project SDK and Project language level to JDK 13. …

Read more

Maven – source value 1.5 is obsolete and will be removed in a future release

In IntelliJ IDEA, Maven builds a project, and hits the following warning message? Warning:java: source value 1.5 is obsolete and will be removed in a future release Warning:java: target value 1.5 is obsolete and will be removed in a future release To fix it, add maven-compiler-plugin plugin. pom.xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> …

Read more

Gradle is not sync with IntelliJ IDEA

Make some changes in the build.gradle file, but the changes never apply or sync to the IDEA (Tested with 2016.3) 1. Using IDEA plugin build.gradle apply plugin: ‘java’ apply plugin: ‘idea’ apply plugin: ‘org.springframework.boot’ 2. Make changes and issue the Gradle clean and idea command. Console $ gracle clean idea $ gradle cleanIdea idea $ …

Read more

IntelliJ IDEA – How to know this class belongs to which JAR

For example, how to find out this FileUploadBase class belongs to which JAR or dependency? //… import org.apache.tomcat.util.http.fileupload.FileUploadBase; @ExceptionHandler(FileUploadBase.FileSizeLimitExceededException.class) public String handleError3(Exception e, RedirectAttributes redirectAttributes) { redirectAttributes.addFlashAttribute("message", e.getCause().getMessage()); return "redirect:/uploadStatus"; } Solution In IntelliJ IDEA, double clicks on the class name and press CTRL + n (win/*nix) or CMD + n (mac) to prompt out …

Read more

Intellij IDEA – Spring boot reload static file is not working

In Eclipse, just include the Spring Boot Dev Tools dependency, then the hot swapping and static file reload will be enabled magically. For Intellij IDE, we need extra steps to enable it. 1. Spring Boot Dev Tools With Spring Boot Dev Tools enabled : Any changes to views or resources can be seen in the …

Read more

Intellij + Infinitest Continuous Testing

The Infinitest is a continuous testing plugin, it helps to run the test automatically. 1. Install on IntelliJ 1.1 In Plugins, clicks on the “Browse repositories…” 1.2 Type “Infinitest” and clicks on the “Install” button. 1.3 Restart the Intellij IDEA. 2. Add Infinitest facet In the project structure / settings, add a “Infinitest” facet. 3. …

Read more

Intellij IDEA – How to build project automatically

By default, Intellij IDEA doesn’t compile classes automatically. But, you can enable the auto compile feature by following steps : In “Project settings or preferences” Select “Build, Execution, Deployment -> Compiler” Checked Make project automatically P.S This feature is available since IDEA 12 References Brand New Compiler Mode in IntelliJ IDEA 12

Intellij IDEA – Auto reload a web application (hot deploy)

In this tutorial, we will show you how to ‘hot deploy’ or ‘hot swap’ a web application in IDEA. Note Tested with Intellij IDEA 14 and 15 1. Select exploded WAR Go Run –>> Edit Configurations –>> “Deployment” tab, clicks + icon –>> select an “exploded artifact” 2. Update classes and resources Select “Server” tab, …

Read more

Java – How to generate serialVersionUID

This article shows you a few ways to generate the serialVersionUID for serialization class. 1. serialver JDK has a built-in command serialver to generate a serialVersionUID automatically. In this example, we use serialver to generate a serialVersionUID for an Address class. Terminal $ serialver Address Address: static final long serialVersionUID = -687991492884005033L; 2. Eclispe IDE …

Read more