kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Access Denied on Windows, folder or file locked

Open llgcode opened this issue 6 years ago • 5 comments

Hi, some folders are locked by the kotlin language server, so windows explorer or any process raise an "Access denied" when access to this folder. I've open Process Explorer and found that process "C:\Program Files\Java\jdk1.8.0_112/bin/java.exe" -classpath "****" org.javacs.kt.MainKt lock a folder where java classes are generated by a javac. I precise that this vscode workspace doesn't contain any kotlin file or kotlin config. when killing the process, it works perfectly. I have deactivated kotlin extension to fix the issue, I use it only to edit teamcity kotlin settings.

this problem has occurred recently (maybe an extension update in vscode). regards

llgcode avatar Sep 03 '19 15:09 llgcode

I also am having issues with some folders being locked by this project. For me, the build/tmp folder in my repository is being locked up such that my gradle script that extracts libraries in that directory fails.

BrenekH avatar Sep 05 '19 03:09 BrenekH

Issue still exists as of v0.6.0.

This issue prevents running a gradle build separately. For some use cases this is necessary, as gradle tasks are used for deploying, testing, etc.

I know nothing about how the language server works, but is this related to the Gradle daemon?

msoucy avatar May 28 '20 00:05 msoucy

Update, still with v0.6.0 - this issue seems to have vanished. To fix it:

  • I closed VS Code completely
  • Deleted the bin/ and build/ folders (as well as buildSrc/build/, which wasn't even used anymore in my project)
  • Reopened VS Code
  • Waited for Kotlin Server to finish launching
  • Tried to .\gradlew build from the terminal.
  • Success

msoucy avatar Jun 20 '20 23:06 msoucy

I will give it a try

llgcode avatar Jun 21 '20 09:06 llgcode

Still happening. Both classes.jar and R.jar are being left open. Forcing a GC.run doesn't cause them to close either.

LeadAssimilator avatar Apr 08 '24 04:04 LeadAssimilator