Skip to content

Commit d9b1781

Browse files
authored
docs: add test compilation error troubleshooting section (#6165)
* docs: add test compilation error troubleshooting section * refactor: imgs -> images * feat: add Source and Target compatibility
1 parent a789035 commit d9b1781

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/java-application-development/development-environment-setup.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,24 @@ Finally, once the build completes, the workspace will be ready to use.
141141

142142
### Troubleshooting
143143

144+
#### Tests import issues
145+
146+
If you are seeing errors related to missing test dependencies like the following:
147+
148+
```
149+
The import org.junit cannot be resolved
150+
```
151+
152+
Make sure the Java Runtime is set to Java 17. To do this, press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (<kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> for Mac users) and run the _"Java: Configure Java Runtime"_ command. Then, in the opened settings, set the "Default JDK" to the installed JDK 17. Example for the `org.eclipse.kura.nm.test` project:
153+
154+
![](./images/configure_java_runtime.png)
155+
156+
Additionally, in the "Compiler" tab, set the "Source" and "Target compatibility" to 17 as well:
157+
158+
![](./images/configure_java_compiler.png)
159+
160+
Repeat this process for each test project showing the error.
161+
144162
#### LSP Out of memory error:
145163

146164
Looks like the JVM running the LSP server requires some additional RAM to parse through Kura. Add a `.vscode/settings.json` file in the root workspace directory containing the following:
44.6 KB
Loading
25.6 KB
Loading

0 commit comments

Comments
 (0)