intellij-idea

Class 'myClassName' already exists in package 'myPackageName'

余生长醉 提交于 2021-02-18 12:06:02
问题 I suddenly started facing a strange issue while working on my Grails application using IntelliJ. I have different domain classes and some other classes under src/groovy . When I open a class file to make some changes, I get an error that this class already exists in package which I don't have. I tried to rename the class using refactor but after that I still get the same error. Can anybody suggest what's wrong here or if I did something wrong? 回答1: Try to "Clear" you project and build again.

Using Intellij With Remote Server

戏子无情 提交于 2021-02-18 10:19:09
问题 I have a dev *nix box. For most cases I can just ssh into the box and use emacs to develop. However, as I've started doing more Java work with very large codebases, I've realized IntelliJ IDEA is pretty invaluable. Problem: I would like to use IntelliJ IDEA on OS X, but work with a project located on some other machine. Is there a way to configure IntelliJ IDEA to do this? (over ssh/mosh/or whatever) Thanks. 回答1: I ended up just using IntelliJ locally and pointing it to a mounted server drive

How to create a fat jar?

风流意气都作罢 提交于 2021-02-18 07:57:50
问题 With SpringBoot, you have the @SpringBootApplication annotation, but what is the equivalent with the neat Java Spark framework? IntelliJ creates a Maven project and I added the spark dependency, but running the install goal, I get a 5 KB jar with no manifest. Not an executable jar. The pom.xml created thus far is as follows: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:/

No tasks available when executing JUnit runner class

廉价感情. 提交于 2021-02-17 21:10:16
问题 I am trying to run Cucumber feature files in IntelliJ. Cucumber Options is pointing to the right folder, but I get the "No tasks available" notification when trying to execute the JUnit runner class. What am I doing wrong? Here is my build.gradle : plugins { id 'java' } sourceCompatibility = 1.8 apply plugin: 'java' repositories { mavenCentral() } compileJava.options.encoding = "UTF-8" dependencies { compile 'org.codehaus.groovy:groovy-all:2.3.11' testCompile group: 'junit', name: 'junit',

No tasks available when executing JUnit runner class

≡放荡痞女 提交于 2021-02-17 21:10:12
问题 I am trying to run Cucumber feature files in IntelliJ. Cucumber Options is pointing to the right folder, but I get the "No tasks available" notification when trying to execute the JUnit runner class. What am I doing wrong? Here is my build.gradle : plugins { id 'java' } sourceCompatibility = 1.8 apply plugin: 'java' repositories { mavenCentral() } compileJava.options.encoding = "UTF-8" dependencies { compile 'org.codehaus.groovy:groovy-all:2.3.11' testCompile group: 'junit', name: 'junit',

Regarding org.apache.spark.sql.AnalysisException error when creating a jar file using Scala

笑着哭i 提交于 2021-02-17 05:33:34
问题 I have following simple Scala class , which i will later modify to fit some machine learning models. I need to create a jar file out of this as i am going to run these models in amazon-emr . I am a beginner in this process. So i first tested whether i can successfully import the following csv file and write to another file by creating a jar file using the Scala class mention below. The csv file looks like this and its include a Date column as one of the variables. +-------------------+-------

How to add Kotlin PSI source files to IDEA Plugin project configuration

浪子不回头ぞ 提交于 2021-02-17 03:44:44
问题 I am trying to add support for kotlin for one of the IDEA plugins. So far, I found this page and understood that I need to work with kotlin PSI files, such as KtClass and others. When I was setting up my project I added idea source files to sdk(by cloning this repo), to make it easier to debug + see documentation. However it seems that these idea source files doesn't include kotlin source files, such as mentioned KtClass and others, which I use in my project. Currently I see only decompiled

IntelliJ IDEA flat package view

穿精又带淫゛_ 提交于 2021-02-16 20:30:53
问题 In IDEA 15, is it a possible to display Java packages in a flat list instead of a tree? Like this: com.example com.example.foo com.example.bar Not this: com.example foo bar 回答1: Just click settings icon in Project tab and select "Flatten packages": 来源: https://stackoverflow.com/questions/33880611/intellij-idea-flat-package-view

Intellij 2016.3.2 keeps changing String import to com.sun.org.apache.xpath.internal.operations.String

允我心安 提交于 2021-02-16 14:51:47
问题 For some unknown reason, in every class where I have methods that return String type or accept String as a parameter, intellij is automatically importing: import com.sun.org.apache.xpath.internal.operations.String; Instead of java.lang.String Is this a known Bug or is there a way to disable this? 回答1: You can exclude classes from import and completion under File | Settings | Editor | General | Auto Import . Check if java.lang.String is not added there by accident. And you can add com.sun.org

How to set Gradle wrapper version when create new project for IntelliJ IDEA?

旧城冷巷雨未停 提交于 2021-02-16 14:51:29
问题 When I create new Gradle project with IntelliJ IDEA, the Gradle wrapper version is always 4.10.2, but I have updated my Gradle to 5.2.1. This is the file gradle/wrapper/gradle-wrapper.properties . distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists I tried update Gradle wrapper version with: ./gradlew wrapper --gradle-version 5.2.1 It works. But,