question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File `.classpath` cannot be re-generated automatically.

See original GitHub issue

The 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
  1. Open a maven project, e.g. a spring-boot project.
  2. Open a *.java file to activate the extension, it starts building the project.
  3. After that, .classpath and .project are auto generated.
  4. Remove files .classpath and .project.
  5. 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: sample

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Eskibearcommented, Jun 13, 2018

@fbricon ok, I can have a try.

1reaction
CodingLegend27commented, Jul 13, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found