cd /news/developer-tools/solutions-to-problems-with-java-deve… · home topics developer-tools article
[ARTICLE · art-10980] src=alexselimov.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Solutions to problems with Java Development

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"`.

read1 min views17 publishedMay 13, 2024

Solutions to problems with Java Development I 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. Problem 1: jdtls exiting with status code 13 I 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: 1rm ~/.cache/jdtls Edit 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. Problem 2: Could not set executable permissions for .gradle When attempting to build with a gradlew script I was running into the following error: Could not set executable permissions for: ~/.gradle/wrapper/dists/gradle-7.6-bin/9l9tetv7ltxvx3i8an4pb86ye/gradle-7.6/bin/gradle After spending some time trying to find a solution, I found a suggestion of setting an environment variable: 1 export JAVA_TOOL_OPTIONS="-Djdk.lang.Process.launchMechanism=vfork" The above environment variable was all I needed and the gradle script was able to assemble the project successfully. Hopefully this is helpful to someone!

── more in #developer-tools 4 stories · sorted by recency
── more on @jdtls 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/solutions-to-problem…] indexed:0 read:1min 2024-05-13 ·