You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-into-the-code/guidelines-for-setting-up-a-local-workspace.md
+41-21Lines changed: 41 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This guide explains how to set up your environment for development of JabRef. It
4
4
5
5
```text
6
6
The most important step is to configure your IDE.
7
-
In case you know how to install JDK14 with JavaFX support and to fork JabRef's code,
7
+
In case you know how to install JDK15 with JavaFX support and to fork JabRef's code,
8
8
please scroll down to the IDE setup.
9
9
```
10
10
@@ -16,13 +16,14 @@ For a complete step-by-step guide for Linux using IntelliJ IDEA as the IDE, have
16
16
17
17
This section list the prerequisites you need to get started to develop JabRef. After this section, you are ready to get the code.
18
18
19
-
### Java Development Kit 14
19
+
### Java Development Kit 15
20
20
21
-
A working Java \(Development Kit\)14 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 14\(e.g `javac 14`\). If `javac` is not found or a wrong version is reported, check your PATH environment variable, your `JAVA_HOME` environment variable or install the most recent JDK.
21
+
A working Java \(Develoment Kit\)15 installation with Java FX support is required. In the command line \(terminal in Linux, cmd in Windows\) run `javac -version` and make sure that the reported version is Java 15\(e.g `javac 15`\). If `javac` is not found or a wrong version is reported, check your `PATH` environment variable, your `JAVA_HOME` environment variable or install the most recent JDK.
22
22
23
-
[JavaFX is not part of the default JDK any more](https://www.reddit.com/r/java/comments/82qm9x/javafx_will_be_removed_from_the_java_jdk_in_jdk_11/), it needs to be installed separately if not using a special JDK. We recommend to setup the full Liberica JDK including JavaFX. You can get it from [https://bell-sw.com/pages/downloads/?version=java-14&package=jdk-full](https://bell-sw.com/pages/downloads/?version=java-14&package=jdk-full). On Windows, you can execute `choco install libericajdkfull`\(requires [installation of chocolatey - a package manager for Windows](https://chocolatey.org/install)\).
23
+
[JavaFX is not part of the default JDK any more](https://www.reddit.com/r/java/comments/82qm9x/javafx_will_be_removed_from_the_java_jdk_in_jdk_11/), it needs to be installed separately if not using a special JDK. ~~We recommend to setup the full Liberica JDK including JavaFX. You can get it from [https://bell-sw.com/pages/downloads/?version=java-15&package=jdk-full](https://bell-sw.com/pages/downloads/?version=java-15&package=jdk-full). On Windows, you can execute `choco install libericajdkfull`\(requires [installation of chocolatey - a package manager for Windows](https://chocolatey.org/install)\).~~ (Liberica JDK 15 does not include the Java compiler properly any more)
24
24
25
-
Alternatively, you can download and install the JDK from [https://jdk.java.net/](https://jdk.java.net/). Afterwards, download download the "jmods" JavaFX 14 zip archive from [https://gluonhq.com/products/javafx/](https://gluonhq.com/products/javafx/) and put the `.jmod` files into `C:\Program Files\OpenJDK\jdk-14.0.1\jmods`.
25
+
Download and install the JDK from [https://jdk.java.net/](https://jdk.java.net/).
26
+
Afterwards, download the "jmods" JavaFX 15 zip archive from [https://gluonhq.com/products/javafx/](https://gluonhq.com/products/javafx/) and put the `.jmod` files into `C:\Program Files\OpenJDK\jdk-15\jmods`.
26
27
27
28
### GitHub Account
28
29
@@ -54,9 +55,18 @@ It is strongly recommend that you have git installed.
54
55
55
56
### IDE
56
57
57
-
We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/) or [Eclipse \(for advanced users\)](https://eclipse.org/)\(`2020-03` or newer\).
58
+
We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/).
59
+
For advanced users, [Eclipse](https://eclipse.org/)\(`2020-09` or newer\) is also possible.
58
60
59
-
On Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. Under Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer.
61
+
#### IntelliJ
62
+
63
+
We recommend to install IntelliJ IDEA using [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/), because IDE updates are automatically installed.
64
+
65
+
#### Ecipse
66
+
67
+
On Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. On Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer.
68
+
69
+
Eclipse JEE 2020-09 or newer is required. For Eclipse 2020-09 you need to install [Java 15 Support](https://marketplace.eclipse.org/content/java-15-support-eclipse-2020-09-417).
60
70
61
71
### Other Tooling
62
72
@@ -86,22 +96,23 @@ This section explains how you get the JabRef code onto your machine in a form al
86
96
87
97
These steps are very important. They allow you to focus on the content and ensure that the code formatting always goes well. Did you know that [IntelliJ allows for reformatting selected code](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html#reformat_code) if you press Ctrl+Alt+L?
88
98
89
-
### Setup for IntelliJ IDEA
90
-
91
-
We recommend to install IntelliJ IDEA using [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/), because IDE updates are automatically installed.
99
+
### Configuration of IntelliJ IDEA
92
100
93
101
IntelliJ IDEA fully supports Gradle as a build tool, but also has an internal build system which is usually faster. For JabRef, Gradle is required to make a full build but once set up, IntelliJ IDEA's internal system can be used for sub-sequent builds.
94
102
95
103
To configure IntelliJ IDEA for developing JabRef, you should first ensure that you have enabled both bundled plugins _Gradle_ and _Gradle Extension_:
96
104
97
105
* Navigate to **File \| Settings \| Plugins \| Installed** and check that you have the _Gradle_ and _Gradle Extension_ enabled.
98
106
99
-
After that, you can open `jabref/build.gradle` as a project. It is crucial that Java 14 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations.
107
+
After that, you can open `jabref/build.gradle` as a project. It is crucial that Java 15 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations.
108
+
109
+
Ensure you have a Java 15 SDK configured by navigating to **File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the location of a JDK 15.
Ensure you have a Java 14 SDK configured by navigating to **File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the location of a JDK 14:
112
+
Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 15
113
+

102
114
103
-
* Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 14
104
-
* Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the Java 14 SDK as the Gradle JVM at the bottom.
115
+
Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the "Project SDK" as the Gradle JVM at the bottom.
105
116
106
117
To prepare IntelliJ's build system two additional steps are required:
107
118
@@ -174,15 +185,24 @@ Contributions to JabRef's source code need to have a code formatting that is con
174
185
* Go to **File \| Settings \| Editor \| Code Style**
175
186
* Click on the settings wheel \(next to the scheme chooser\), then click "Import Scheme"
176
187
* Select the IntelliJ configuration file `config/IntelliJ Code Style.xml`
177
-
* Go to **File \| Settings \| Tools \| Checkstyle \| Configuration File** 1. Import the CheckStyle configuration file by clicking the \[+\] button 2. For the description provide "JabRef" 3. Click "Browse" and choose `config/checkstyle/checkstyle.xml` 4. Click "Next" and "Finish" 5. Activate the CheckStyle configuration file by ticking it in the list 6. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 14. 7. Set the "Scan Scope" to "Only Java sources \(including tests\) 8. Save settings by clicking "OK" 9. Your configuration should now look like this:
178
188
179
-
```text
189
+
Finally, ensure that the checkstyle configuration file is in place:
190
+
191
+
1. Go to **File \| Settings \| Tools \| Checkstyle \| Configuration File**
192
+
2. Import the CheckStyle configuration file by clicking the \[+\] button
193
+
3. For the description provide "JabRef"
194
+
4. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
195
+
5. Click "Next" and "Finish"
196
+
6. Activate the CheckStyle configuration file by ticking it in the list
197
+
7. Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected \(8.36 or higher\). 8.36 is required for Java 15.
198
+
8. Set the "Scan Scope" to "Only Java sources \(including tests\)
Make sure your Eclipse installation us up to date, Eclipse JEE 2020-03 or newer is required. For Eclipse 2020-03 you need to install [jdk14 support](https://marketplace.eclipse.org/content/java-14-support-eclipse-2020-03-415)
205
+
Make sure your Eclipse installation us up to date.
186
206
187
207
1. Run `./gradlew run` to generate all resources and to check if JabRef runs.
188
208
* The JabRef GUI should finally appear.
@@ -234,7 +254,7 @@ Got it running? GREAT! You are ready to lurk the code and contribute to JabRef.
234
254
235
255
### Java installation
236
256
237
-
An indication that `JAVA_HOME` is not correctly set or no JDK 14 is installed is following error message:
257
+
An indication that `JAVA_HOME` is not correctly set or no JDK 15 is installed is following error message:
238
258
239
259
```text
240
260
compileJava FAILED
@@ -261,9 +281,9 @@ In rare cases you might encounter problems due to out-dated automatically genera
261
281
There might be problems with building if you have openjfx libraries in local maven repository, resulting in errors like this:
262
282
263
283
```text
264
-
> Could not find javafx-fxml-14-mac.jar (org.openjfx:javafx-fxml:14).
284
+
> Could not find javafx-fxml-15-mac.jar (org.openjfx:javafx-fxml:15).
265
285
Searched in the following locations:
266
-
file:<your local maven repository path>/repository/org/openjfx/javafx-fxml/14/javafx-fxml-14-mac.jar
286
+
file:<your local maven repository path>/repository/org/openjfx/javafx-fxml/15/javafx-fxml-15-mac.jar
267
287
```
268
288
269
289
As a workaround, you can remove all local openjfx artifacts by deleting the whole openjfx folder from specified location.
0 commit comments