[Java] Set AdoptOpen JDK in STS (Eclipse)

I want to set the JDK in STS (Eclipse)

・ After updating Eclipse to 2020-09, I'm running Eclipse with jre! Message appears -When I tried to put MissionControl in order to grasp the memory status, it had to work with JDK!

I want to run Eclipse with jdk for the reason, but I'm wondering which JDK to use, so it's a memorandum.

environment

・ Windows10 64bit ・ STS4 (Eclipse2020-09) ・ AdoptOpenJDK 11, ~~ 15 ~~ (If it is 15, an error will occur, it may be better to wait until the problem is fixed)

There are various JDKs ...

-Oracle JDK (Java SE) https://www.oracle.com/java/technologies/javase-downloads.html If you search for jdk download, you will find jdk that was originally available for commercial use but now requires a license.

・ Open JDK https://openjdk.java.net/install/ Open source jdk. Commercially available. At first, I set this to the Eclipse startup vm, but it started, but I got an error in the build.

-AdoptOpen JDK https://adoptopenjdk.net/ An open source jdk that joined the Eclipse Foundation. When I set it, I was able to build without any error.

download

1. Go to https://adoptopenjdk.net/
2. Select version and JVM (11, select HotSpot) <-15 was set and an error occurred during build ...

image.png

3. Launch the downloaded installer

image.png image.png

4. Edit the ini file when done

・ ** SpringToolsSuite4.ini ** Set the path of the installed bin directory under vm

-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.springframework.boot.ide.branding.sts4
--launcher.defaultAction
openFile
-vm
C:/Program Files/AdoptOpenJDK/jdk-11.0.8.10-hotspot/bin
;plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms1024m
-Xmx4096m
--add-modules=ALL-SYSTEM
-Xverify:none
-javaagent:dropins/MergeDoc/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar

・ ** Eclipse.ini ** I also tried it in Eclipse and it worked.

-vm
C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot\bin
;plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.2.v20200815-0932/jre/bin
-startup
plugins/org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1300.v20200819-0940
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-javaagent:dropins/MergeDoc/eclipse/plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar
-javaagent:lombok.jar
-Xverify:none
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=30000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=30000
-Dosgi.requiredJavaVersion=11
[email protected]/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms3G
-Xmx5G
--add-modules=ALL-SYSTEM
5. Start STS (Eclipse)

image.png

MissionControl It seems to be working properly. image.png

That's all, thank you for your hard work!

Recommended Posts

[Java] Set AdoptOpen JDK in STS (Eclipse)
Null-safe program in Java (Eclipse)
First Java development in Eclipse
Try running Selenuim 3.141.59 in eclipse (java)
Hello World in java in eclipse now
How to set Lombok in Eclipse
JPA (Java Persistence API) in Eclipse
Java (set)
Play Framework 2.6 (Java) environment construction in Eclipse
About Records preview added in Java JDK 14
Java management and STS (Eclipse) build path settings
A story about the JDK in the Java 11 era
Technology for reading Java source code in Eclipse
Partization in Java
[Java] API creation using Jerjey (Jax-rs) in eclipse
Changes in Java 11
Set HTTP Keep Alive Timeout in Java HTTP Client
Rock-paper-scissors in Java
MVC in Eclipse.
Set pop-up display for Java language in vim.
Pi in Java
FizzBuzz in Java
How to Git manage Java EE projects in Eclipse
[java] sort in list
Read JSON in Java
Interpreter implementation in Java
Make Blackjack in Java
Rock-paper-scissors app in Java
Constraint programming in Java
Put java8 in centos7
Java (eclipse) installation procedure
Eclipse ~ Java project creation ~
NVL-ish guy in Java
Combine arrays in Java
"Hello World" in Java
Comments in Java source
Set CookieSpec in HttpClient 4.3
Azure functions in java
Format XML in Java
Simple htmlspecialchars in Java
To debug in eclipse
Boyer-Moore implementation in Java
Hello World in Java
Use OpenCV in Java
webApi memorandum in java
Type determination in Java
Ping commands in Java
Various threads in java
Heapsort implementation (in java)
Zabbix API in Java
ASCII art in Java
Compare Lists in Java
POST JSON in Java
Express failure in Java
Create JSON in Java
Date manipulation in Java 8
What's new in Java 8
Use PreparedStatement in Java
What's new in Java 9,10,11
Parallel execution in Java
Initializing HashMap in Java