{"slug": "solutions-to-problems-with-java-development", "title": "Solutions to problems with Java Development", "summary": "The article documents two solutions to Java development issues. The first problem, where jdtls crashes with status code 13, is resolved by deleting the `~/.cache/jdtls` cache directory. The second problem, a Gradle permission error, is fixed by setting the environment variable `JAVA_TOOL_OPTIONS=\"-Djdk.lang.Process.launchMechanism=vfork\"`.", "body_md": "Solutions to problems with Java Development\nI recently ran into some problems with java development. One problem was neovim specific but the other was an issue with gradle. I wanted to document these in case any one else has similar problems as it took me a little bit of time to figure out.\nProblem 1: jdtls exiting with status code 13\nI use jdtls through Mason with the built in nvim LSP and was recently having an issue where jdtls would immediately crash when opening a file. The solution to this problem was just deleting the cache for jdtls:\n1rm ~/.cache/jdtls\nEdit 05/14/2024: This also solves the problem of jdtls not attaching on neovim startup. May solve other problems as well, so should be first thing to try if jdtls isn’t working.\nProblem 2: Could not set executable permissions for .gradle\nWhen attempting to build with a gradlew script I was running into the following error:\nCould not set executable permissions for: ~/.gradle/wrapper/dists/gradle-7.6-bin/9l9tetv7ltxvx3i8an4pb86ye/gradle-7.6/bin/gradle\nAfter spending some time trying to find a solution, I found a suggestion of setting an environment variable:\n1 export JAVA_TOOL_OPTIONS=\"-Djdk.lang.Process.launchMechanism=vfork\"\nThe above environment variable was all I needed and the gradle script was able to assemble the project successfully. Hopefully this is helpful to someone!", "url": "https://wpnews.pro/news/solutions-to-problems-with-java-development", "canonical_source": "https://www.alexselimov.com/posts/java_dev_problems/", "published_at": "2024-05-13 00:03:17+00:00", "updated_at": "2026-05-23 08:36:43.493687+00:00", "lang": "en", "topics": ["developer-tools", "open-source"], "entities": ["jdtls", "Mason", "nvim", "Gradle", "Neovim"], "alternates": {"html": "https://wpnews.pro/news/solutions-to-problems-with-java-development", "markdown": "https://wpnews.pro/news/solutions-to-problems-with-java-development.md", "text": "https://wpnews.pro/news/solutions-to-problems-with-java-development.txt", "jsonld": "https://wpnews.pro/news/solutions-to-problems-with-java-development.jsonld"}}