File `.classpath` cannot be re-generated automatically.
See original GitHub issueThe scenario is:
I open a maven project, and it builds the project for me, and it works well. After wrongly deleting the .classpath
file, I can never get it back. Restarting VSCode doesn’t work either.
Environment
- Operating System: Win 10 Enterprise
- JDK version: Oracle JDK 1.8.0_171
- Visual Studio Code version:
Version 1.24.0
Commit 6a6e02cef0f2122ee1469765b704faf5d0e0d859
Date 2018-06-06T17:35:40.560Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
- Java extension version: 0.26.0
Steps To Reproduce
- Open a maven project, e.g. a spring-boot project.
- Open a *.java file to activate the extension, it starts building the project.
- After that,
.classpath
and.project
are auto generated. - Remove files
.classpath
and.project
. - Reload window,
.project
has been re-generated, but.classpath
cannot be re-generated.
Current Result
Missing .classpath
file, the project fails to build.
Expected Result
File .classpath
can be re-generated just as we first open the project.
Additional Informations
The original issue is https://github.com/Microsoft/vscode-maven/issues/64
I can easily reproduced it and made a GIF, FYI:
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Change name and/or path of .classpath file in Eclipse
I added the content of my .classpath file to the question. I am not sure whether it gets regenerated by sbt but I...
Read more >The .classpath file for my custom extensions is missing, Is ...
model.ProductModel cannot be resolved that I am not able to dig into while there's no IDE. My question is if there's a way...
Read more >Some inner class files get "lost" and aren't regenerated when ...
There is a consistent issue with inner classes not being compiled which has persisted since at least NB 6.0. The .java file in...
Read more >Understanding the Tomcat Classpath - Common problems ...
A common question that pops up on lots of Apache Tomcat user forums is how to configure Tomcat's classpath to include this or...
Read more >185601 – .apt_generated is not restored as a source folder
classpath file (it still contains .apt_generated as a source folder). This is OK. SECOND SCENARIO (FAILS): Instead of performing the delete from ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@fbricon ok, I can have a try.
I had some issues with debugging the java project. So i thought first that it was an error due to the missing .classpath file. But in the end i figured out that it was the vs code extension ‘Java Language Support’ by George Fraser, which always said that ‘java.awt.*’ cannot be imported.
TLDR: I uninstalled this extension and everything worked well again. So no error due to missing .classpath file!