2022/02/28
2022/02/20
mac java version
久しぶりにJavaを触った。
many many jdks ...so how to mange so many jdks
- show jdks version on your mac pc
/usr/libexec/java_home -V - env is a good idea.
- python->pyenv
- node->nodenv
- ruby->rbenv
- golang->gvm
- java->jenv
- install jenv
brew install jenv
export JENV_ROOT="$HOME/.jenv"
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
jenv doctor - add jdk path to jenv
jenv add /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home - use some version
jenv local 11
2022/02/16
Gradle The JavaExec.main property has been deprecated
deprecated gradle features were used in this build, making it incompatible with gradle 8.0.
=> add ↓ to gradle.properties
org.gradle.warning.mode=all
then
he JavaExec.main property has been deprecated
change build.gradle
plugins {
id "application"
}
apply plugin : "java"
application {
mainClass = 'xxx.xxx'
}
then
gradle run
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
slf4j has more implements. but you have none in you class path, that is the reason.
add it
gradle example
build.gradle
```
dependencies { implementation 'org.slf4j:slf4j-log4j12:1.7.36' }
```