diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2021-10-02 18:13:00 +0200 |
---|---|---|
committer | Kristóf Marussy <marussy@mit.bme.hu> | 2021-10-02 18:22:03 +0200 |
commit | 0f90721a6cb9b3f6c283dd50053c9b040a395290 (patch) | |
tree | c6d35d4d43384e87856995eb9cd0832456221517 /README.md | |
parent | chore: bump Maven dependencies (diff) | |
download | refinery-0f90721a6cb9b3f6c283dd50053c9b040a395290.tar.gz refinery-0f90721a6cb9b3f6c283dd50053c9b040a395290.tar.zst refinery-0f90721a6cb9b3f6c283dd50053c9b040a395290.zip |
build: bump to Java 17
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -6,34 +6,31 @@ | |||
6 | 6 | ||
7 | ### With Eclipse IDE | 7 | ### With Eclipse IDE |
8 | 8 | ||
9 | 1. Download and install a _Java 11_ compatible JDK. For Windows, prefer OpenJDK builds from [Adoptium](https://adoptium.net/). | 9 | 1. Download and install a _Java 17_ compatible JDK. For Windows, prefer OpenJDK builds from [Adoptium](https://adoptium.net/). |
10 | 10 | ||
11 | 2. Download and extract the [Eclipse Modeling Tools 2021-09](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-modeling-tools) package. | 11 | 2. Download and extract the [Eclipse IDE for Java and DSL Developers 2021-09](https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-and-dsl-developers) package. |
12 | 12 | ||
13 | 3. Launch Eclipse and create a new workspace. | 13 | 3. Launch Eclipse and create a new workspace. |
14 | 14 | ||
15 | 4. Switch to the _Java_ perspective and close the _Modeling_ perspective. | 15 | 4. Open _Help > Install New Software..._ and install the following software from the _2021-09_ update site: |
16 | |||
17 | 5. Open _Help > Install New Software..._ and install the following software from the _2021-09_ update site: | ||
18 | * _Modeling > Ecore Diagram Editor (SDK)_ | 16 | * _Modeling > Ecore Diagram Editor (SDK)_ |
19 | * _Modeling > Xtext Complete SDK_ | ||
20 | * _Programming Languages > Xtend IDE_ | ||
21 | 17 | ||
22 | 6. Open _Help > Eclipse Marketplace_ and install _Buildship Gradle Integration_. | 18 | 5. Open _Help > Eclipse Marketplace_ and install the following software: |
19 | * _Java 17 Support for Eclipse 2021-09_ | ||
20 | * _SonarLint_ | ||
23 | 21 | ||
24 | 7. Open _Window > Preferences_ and set the following preferences: | 22 | 6. Open _Window > Preferences_ and set the following preferences: |
25 | * _General > Workspace > Text file encoding_ should be _UTF-8_. | 23 | * _General > Workspace > Text file encoding_ should be _UTF-8_. |
26 | * _General > Workspace > New text file line delimiter_ should be _Unix_. | 24 | * _General > Workspace > New text file line delimiter_ should be _Unix_. |
27 | * Add the JDK 11 to _Java > Installed JREs_. | 25 | * Add the JDK 17 to _Java > Installed JREs_. |
28 | * Make sure JDK 11 is selected for _JavaSE-11_ at _Java > Installed JREs > Execution Environments_. | 26 | * Make sure JDK 17 is selected for _JavaSE-17_ at _Java > Installed JREs > Execution Environments_. |
29 | * Set _Gradle > Java home_ to the `JAVA_HOME` directory (the directory which contains the `bin` directory) of JDK 11. | 27 | * Set _Gradle > Java home_ to the `JAVA_HOME` directory (the directory which contains the `bin` directory) of JDK 17. Here, Buildship will show a yellow warning sign, which can be safely ignored. |
30 | Buildship will show a yellow warning sign, which can be safely ignored. | ||
31 | 28 | ||
32 | 8. Clone the project Git repository but do not import it into Eclipse. | 29 | 7. Clone the project Git repository but do not import it into Eclipse yet. |
33 | 30 | ||
34 | 9. Open a new terminal an run `./gradlew build` (`.\gradlew build` on Windows) in the cloned repository. This should complete without any compilation error. | 31 | 8. Open a new terminal an run `./gradlew build` (`.\gradlew build` on Windows) in the cloned repository. This should complete without any compilation errors. If you get any errors about the JVM version, check whether the `JAVA_HOME` environment variable is set to the location of JDK. You can query the variable with `echo $JAVA_HOME` on Linux and `echo $Env:JAVA_HOME` in PowerShell on Windows. To set it, use `export JAVA_HOME=/java/path/here` or `$Env:JAVA_HOME="C:\java\path\here"`, respectively. |
35 | 32 | ||
36 | 10. Select _File > Import... > Gradle > Existing Gradle Project_ and import the cloned repository in Eclipse. | 33 | 9. Select _File > Import... > Gradle > Existing Gradle Project_ and import the cloned repository in Eclipse. |
37 | Make sure to select the root of the repository (containing this file) as the _Project root directory_ and that the _Gradle distribution_ is _Gradle wrapper_. | 34 | Make sure to select the root of the repository (containing this file) as the _Project root directory_ and that the _Gradle distribution_ is _Gradle wrapper_. |
38 | If you have previously imported the project into Eclipse, this step will likely fail. | 35 | If you have previously imported the project into Eclipse, this step will likely fail. |
39 | In that case, you can remove the projects from Eclipse, run `git clean -fxd` in the repository, and start over from step 9. | 36 | In that case, you can remove the projects from Eclipse, run `git clean -fxd` in the repository, and start over from step 9. |