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
{{ message }}
Repository navigation
Renaming file causes FileNotFoundException on java language server start #154
Rename a file and folder of package
In my case it was android/app/src/main/java/za/co/io/reactnativekeystore/KeystoreModule.java android/app/src/main/java/za/co/io/reactnativekeystore/KeystorePackage.java
and I renamed them to android/app/src/main/java/za/co/io/reactnativecrypto/CryptoModule.java android/app/src/main/java/za/co/io/reactnativecrypto/CryptoPackage.java
Restart VSCode
Language server fails to start throwing FileNotFoundException
Purging ~/Library/Application Support/Code/User/workspaceStorage and restarting VSCode solved the problem
I have the same issue: I created a folder src and moved all my files inside, but the extension keeps looking for the file at the project root whenever i close/reopen vscode.
File not found: C:\cygwin64\home\Kyasaki\etna2\tic\djav\proj\Main.java.
(Path is now C:\cygwin64\home\Kyasaki\etna2\tic\djav\proj\ src \Main.java.
The problem still exists—"file not found" errors in console for renamed/removed files—and is still fixable the same way, workspaceStorage: del /s /q %APPDATA%\Code\User\workspaceStorage\ with closed VS code
I'm going to say that I still have this same issue, solved by the manual deletion of workspaceStorage.
Looks like it just doesn't make a simple check whether the file exists or not, and errors out when it tries to load it.
Same issue here [REDACTED] when I tried to move/rename a folder/file.
As it's impossible for VS Code to support Alias feature of macOS that tracks the path of any file, it must use symbolic link which broke when any folder in the path is renamed, so I removed the folder from the workspace and readied it after renaming.
However, what I don't realize is that the Java Language Server still sticks to the path to the file even after it's removed from the workspace! I tried restarting VS Code and even Reinstalling the whole extension pack but neither of them helped — the error persists. Thanks you for your fix 🙂 as I cannot find it anywhere else.
It must be a problem that it is saving caches to the disk folder "workspaceStorage" which contains the path to the source files
[REDACTED]
I think VS Code should add a move/rename folder/file feature
Operating System: macOS High Sierra 10.13.2
JDK version: JDK9
VSCode: 1.19.1
Java extension version: 0.16.0
Activity
fbricon commentedon Feb 14, 2017
I can't reproduce this issue. Could you please paste a complete stacktrace?
Kyasaki commentedon Mar 13, 2017
I have the same issue: I created a folder src and moved all my files inside, but the extension keeps looking for the file at the project root whenever i close/reopen vscode.
(Path is now C:\cygwin64\home\Kyasaki\etna2\tic\djav\proj\ src \Main.java.
fbricon commentedon Mar 13, 2017
Try the following steps:
%APPDATA%\Code\User\workspaceStorage\.Kyasaki commentedon Mar 14, 2017
Deleting the workspaceStorage greatly works for me 👍
Doing it manually therefore is a little bit ugly :/
kirilloid commentedon Jun 28, 2017
The problem still exists—"file not found" errors in console for renamed/removed files—and is still fixable the same way, workspaceStorage:
del /s /q %APPDATA%\Code\User\workspaceStorage\with closed VS codeOperating System: Win 10 Enterprise 14393.1358
JDK version: jdk1.8.0_121
Visual Studio Code version: 1.13.1
Java extension version: 0.6.0
Dasky14 commentedon Oct 13, 2017
I'm going to say that I still have this same issue, solved by the manual deletion of workspaceStorage.
Looks like it just doesn't make a simple check whether the file exists or not, and errors out when it tries to load it.
Operating System: Win 10 Pro 15063.674
JDK version: 1.8.0_144
VScode: 1.17.1
Java extension version: 0.11.0
kevin-he-01 commentedon Jan 9, 2018
Same issue here [REDACTED] when I tried to move/rename a folder/file.
As it's impossible for VS Code to support Alias feature of macOS that tracks the path of any file, it must use symbolic link which broke when any folder in the path is renamed, so I removed the folder from the workspace and readied it after renaming.
However, what I don't realize is that the Java Language Server still sticks to the path to the file even after it's removed from the workspace! I tried restarting VS Code and even Reinstalling the whole extension pack but neither of them helped — the error persists. Thanks you for your fix 🙂 as I cannot find it anywhere else.
It must be a problem that it is saving caches to the disk folder "workspaceStorage" which contains the path to the source files
[REDACTED]
I think VS Code should add a move/rename folder/file feature
Operating System: macOS High Sierra 10.13.2
JDK version: JDK9
VSCode: 1.19.1
Java extension version: 0.16.0
Error log when I tried to move the folder "Java Test" from
~/No Sync/Java Testing/Java Testto~/Desktop/Java Test:VS Code Java Extension By Red Hat Error log.txt
Note: I edited this comment and removed unnecessary information and added logs
robstryker commentedon Oct 28, 2026
No activity on this issue since 2018, so, I'll be closing this unless someone indicates it's still an issue for them.