IDEA IntelliJ Config for Java Projects
IDEA IntelliJ Config for Java
My Sprint project config
1. for gradle
- open a project via
build.gradle
, “Open as Project.”. - Use Gradle from
- ‘gradle-wrapper.properties’ file:
- this is a recommended default option that uses Gradle wrapper.
- The Gradle version is saved in the gradle-wrapper.properties file in the gradle directory of your project and help you eliminate any Gradle version problems.
- ‘wrapper’ task in Gradle build script: It might be convenient if you prefer to control which Gradle version to use in the project.
- ‘gradle-wrapper.properties’ file:
- gradle.properties:
- specify VM options for your Gradle project
- Gradle user home
- specify the location of stored Gradle caches, downloaded files, and so on.
- If Gradle location has been defined by the environment variables GRADLE_HOME or PATH, then IntelliJ IDEA deduces this location, and suggests this path as the default value.
issues
1. IDEA IntelliJ Config for Java
Preference | compiler | Build Project Automatically |
2. allow live reload with spring boot devtools
- Enable Automake from the compiler
- ⌘+Shift+A
- type make project automatically,
- Enable Make Project automatically feature
- Enable Automake when the application is running
- ⌘ + shift + A
- Type: Registry
- then enable compiler.automake.allow.when.app.running
3. Intellij does not succeed JAVA_HOME after using SDKMAN
Could not resolve all dependencies for configuration ‘:classpath’
Set JAVA_HOME globally on MAC OS with launchctl
\$ launchctl setenv JAVA_HOME $(/usr/libexec/java_home -v 1.8)
# or
\$ launchctl setenv JAVA_HOME ~/.sdkman/candidates/java/current
4. customise your font colour
- select your text
- cmd + shift + a
- select the option
- select your colour and confirm
5. How to clear out all global setting info
Normally information like this will be found in one of the following places in OS X:
/Users/username/Library/Preferences/AppName
/Users/username/Library/Preferences/com.appname.plist
/Users/username/Library/Application Support/AppName
/Library/Preferences/AppName
/Library/Preferences/com.appname.plist
/Library/Application Support/AppName
If the app adheres to the standard OS X conventions you will find info in one or all of these places. If it doesn’t store here you might check for a /Users/username/.intellij
folder or something similar in your home directory
Got Errors
1. Could not target platform: ‘Java SE 11’ using tool chain: ‘JDK 8
Gradle JVM: change to version 1.8