I think many people use it on Windows, but I chose mac as a personal hobby. It's often annoying, so I'm using a mac unless I'm doing VR or graphics processing.
There are many things to say about Java, but this time I will use openJDK. Java open source.
For example, if you want to use java11, select "11.0.2 (build 11.0.2 + 9)" and enter it. http://jdk.java.net/archive/
Install it in a suitable place like this.
mv ~/Downloads/jdk-11.0.2.jdk/ /Library/Java/JavaVirtualMachines/
Set JAVA_HOME and PATH
.bashrc
#java
#export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk"
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
export PATH="$JAVA_HOME/bin:$PATH"
source ~/.bashrc
java -version
>openjdk version "11.0.2" 2019-01-15
>OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
>OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
OK if the java version changes
If you use Java IDE, you have two choices, eclipse or InteliJ.
eclipse There are many shares that are overwhelmingly used at Japanese sites. Delicate to the version Sometimes it behaves in a way that I don't understand. https://mergedoc.osdn.jp/
IntelliJ costs money, but it's easy to use. The initial loading is slow, and there are not many Japanese documents. Follow evangelist-like people and get them to lead the community.
Create a workspace directory. When I open eclipse, I'm told to select a workspace, so At that time, select the created directory. Import projects into this directory and put usable projects.
Start-up
Select a workspace. First of all, the startup is slow from here. Sometimes it's early. Let's go buy a canned coffee here.
In this case, I am trying to import by selecting the folder m ... under the Download folder. There is no project called m ... in the workspace, so I checked the copy.
Import. Is displayed in the project explorer on the left.
By the way The project can be opened and closed. It's a good idea to close it when you don't need it.
Names such as Maven, Gradle, and SBT come up. Those who build java. Select when launching a java project. The format is a little different.
First put the path in the IDE
Project right-handed Select your favorite java
Refresh if weird errors remain
If you want to use Spring, install it around here.
You should have been able to set the environment.
There are some differences in the environment, but I'll leave the rest to other articles.
[mac] [Eclipse] Run Java Spring on jdk10 https://qiita.com/miyamotok0105/items/950667b4f05ef9b03c0c
[Ubuntu18 / mac] [IntelliJ] Set up tomcat9 with jdk10 https://qiita.com/miyamotok0105/items/3f5e429d80cfe2ca3f32
java tends to be redundant, such as around getter setter. It can be omitted by using Lombok. You can omit kotlin, scala, etc., but there is pressure on the site depending on who maintains it.
Press Download from here to download the jar from the installer https://projectlombok.org/
Then let's put the jar. Ochimai.
#Just check
ls /hogehoge/lombok.jar
#Installation
java -jar lombok.jar
#Put gradle on mac
brew install gradle
#Also clean
brew cleanup
#You will be able to use gradlew. gradlew is gradle+Crawler. Download at the same time when there is no module.
gradle wrapper
gradle build
./gradlew clean bootJar
brew install maven
#Also clean
brew cleanup
mysql -uroot -p
create database hoge default character set utf8 collate utf8_general_ci;
It works
https://github.com/spring-guides/gs-spring-boot-docker/tree/master/complete
https://github.com/codefresh-contrib/gradle-sample-app
wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh
To be honest, I can't move it.
callicoder/spring-security-react-ant-design-polls-app
https://github.com/callicoder/spring-security-react-ant-design-polls-app
wangenyong/spring-boot-deploy
https://github.com/wangenyong/spring-boot-deploy
gosutesu/study-java
https://github.com/gosutesu/study-java
SpringBoot + Kotlin +Try using Docker
https://qiita.com/qphsmt/items/10520fa92c06df022ef7
I can't find the eclipse plugin.
https://www.ksakae1216.com/entry/2017/02/24/063000
https://github.com/andrew-boutin/spring-rest-hello-world
https://github.com/bingqiao/spring-boot-example
https://github.com/tokuhirom/java-handbook
https://github.com/fishey2/java-component-template
https://github.com/yosuke0517/spring-boot-docker
Conclusion: It's not working in my environment, but can I use remote debugging? https://qiita.com/cyclon2joker/items/71c481fe08c961f3acec
https://github.com/IdeaUJetBrains/SpringBootDockerDemoDebug
Prepare the development environment for Spring Boot and PostgreSQL with just docker-compose! → Isn't this sample strange? I haven't really enjoyed using docker. https://qiita.com/gosutesu/items/f45150cbde3f035c54dd
https://qiita.com/seri_k/items/e978c1339ce51f13e297 https://qiita.com/takayamag/items/1469c59370df348240f8 https://qiita.com/spaciba_h_t/items/c96e96be99596b0a9fe4 https://qiita.com/niwasawa/items/fed67553845f8d1b72bc
Recommended Posts