I am trying to import Gradle project in Intellij Idea with local Gradle distrib and getting stacktrace with the following message: Could not target platform: ‘Java SE 8’ using tool chain: ‘JDK 7 (1.7)’. Could anyone explain please what could be the reason? Answer Finally I imported my Gradle project. These are the steps: I switched from local Gradle distrib
Tag: intellij-idea
Why does IntelliJ IDEA give a warning that this file javadoc is dangling?
I’m using IntelliJ IDEA and I tried to add a Javadoc comment at the top of the file like this: But IntelliJ gives me the warning “Dangling Javadoc comment.” What makes this comment dangling? I thought because it’s tagged with @file, it should be at the start of the file. Answer Javadoc has no @file or @date tags. You should
Why are some maven projects in IntelliJ grayed out?
Why are some maven projects in IntelliJ greyed out? Answer Seems images are better way to answer this question. Projects are greyed out when you ignore them in your IntelliJ workspace. To add those projects or modules back in your workspace, right click on them and click on unignore projects as shown in below screenshot. Alternatively, you can also go
Run a Maven Project using IntelliJ IDEA
I’m new to IntelliJ IDEA and I would like to run a simple Maven Quickstart project using it. I followed all the instructions, the project was sucessfully built. But when I try to compile and run it , the Run button is not activated. It looks like IntelliJ IDEA couldn’t figure out where the main class is. This is a
Extracting multiple string to constant in Intellij IDEA
In my code, there are a lot of strings appeared in the following structure: I would like to extract the string key to a constant. However, doing this one by one will take forever…So, is there a better way to achieve this? Answer No idea in Intellij, but if your lines are genuinely that simple, you can do it with
Error:java: invalid flag: -release
I use Java : and IntelliJ IDEA: Get error when compiling: Executing javac -help : So javac should use two hyphens with release, but Intellij Idea use with one. Can I override javac options that IDEA use or fix it in some way? UPD: Even Build, Execution, Deployment > Compiler > Java Compiler Additional Command Line Parameter doesn’t help in
IntelliJ IDEA cannot resolve static import
When I import regularly it works as expected: However, if I change an import to static, IDEA cannot resolve it: Gradle builds the project successfully. It seems to be a problem with IDEA but I can’t find if it is a known problem. I tried cleaning, invalidate caches etc. Anything else I can do? Im using IntelliJ IDEA community 2016.2.4
Search string from JAR file global in Intellij Idea
I am developing stomp+WebSocket using Intellij Idea. Now I need to know: how to search string from Intellij Idea global? For example, I got this error: And I go to class WebSocketAnnotationMethodMessageHandler in spring-websocket.jar(Maven’s jar) and find nothing about this string:No matching methods or Searching methods to handle. So I want to search where the message is. How to do?
IntelliJ IDEA 16 add maven dependencies to classpath
I am new to IntelliJ and using 2016.2 version. Previously I was using Eclipse. I am trying to set up a simple maven spring test project, however I can’t figure out what is wrong. Note: I know what the exception means, and I know the solution using Eclipse Note 2: I tried on a clean Idea installation As per my
Xtend force java 7 language level
I am using Xtend in intellij from the Xtend-plugin. My project language level is set to Java 8 and Xtend compiles fine to Java 8 (e.g. using lambda expressions). For specific reasons, I need Xtend to generate Java 7 code, without changing the language level of my remaining project (Java 8). In the Xtend project settings I can set the