jsmin6330 / hello-rest-sb

0 stars 0 forks source link

install jdk17 #1

Open jsmin6330 opened 4 months ago

jsmin6330 commented 4 months ago

install jdk17

$ sudo apt install openjdk-17-jdk

.zshrc 의 JAVA_HOME 변경

$ pwd
/home/jsmin630
$ vi .zshrc

image

변경한 .zshrc 적용하기

$ source .zshrc
jsmin6330 commented 4 months ago

JDK installations

Untitled (3)

Untitled (4)

jsmin6330 commented 4 months ago
$ pwd
$ ./gradlew bootJar
Downloading https://services.gradle.org/distributions/gradle-7.4.2-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%

Welcome to Gradle 7.4.2!

Here are the highlights of this release:
 - Aggregated test and JaCoCo reports
 - Marking additional test source directories as tests in IntelliJ
 - Support for Adoptium JDKs in Java toolchains

For more details see https://docs.gradle.org/7.4.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 22s
3 actionable tasks: 3 executed
jsmin6330 commented 4 months ago
$ ls -l build/libs
total 19168
-rw-r--r-- 1 jsmin630 jsmin630 19626492 Feb 27 13:36 rest-service-0.0.1-SNAPSHOT.jar

$ java -jar build/libs/rest-service-0.0.1-SNAPSHOT.jar

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.2.0)

2024-02-27T13:45:29.806+09:00  INFO 45765 --- [           main] c.e.restservice.RestServiceApplication   : Starting RestServiceApplication v0.0.1-SNAPSHOT using Java 17.0.10 with PID 45765 (/home/jsmin630/code/hello-rest-sb/build/libs/rest-service-0.0.1-SNAPSHOT.jar started by jsmin630 in /home/jsmin630/code/hello-rest-sb)
2024-02-27T13:45:29.810+09:00  INFO 45765 --- [           main] c.e.restservice.RestServiceApplication   : No active profile set, falling back to 1 default profile: "default"
2024-02-27T13:45:30.775+09:00  INFO 45765 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 8080 (http)
2024-02-27T13:45:30.783+09:00  INFO 45765 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-02-27T13:45:30.784+09:00  INFO 45765 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.16]
2024-02-27T13:45:30.828+09:00  INFO 45765 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-02-27T13:45:30.829+09:00  INFO 45765 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 921 ms
2024-02-27T13:45:31.198+09:00  INFO 45765 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 8080 (http) with context path ''
2024-02-27T13:45:31.210+09:00  INFO 45765 --- [           main] c.e.restservice.RestServiceApplication   : Started RestServiceApplication in 1.86 seconds (process running for 2.253)
2024-02-27T13:46:53.200+09:00  INFO 45765 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-02-27T13:46:53.200+09:00  INFO 45765 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2024-02-27T13:46:53.202+09:00  INFO 45765 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms