redhat-developer / redhat-developer/vscode-java
Visual Studio Code deleting class files in target folder
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I'm working on multi module Maven project, i built in cmd using mvn clean install/deploy and the build is successful, all the class files in target\class folder are generated.
But when i import this project in VS Code, while opening the projects it is deleting all the class files i.e it deletes target\classes*com* folder in all the projects.
And, VS code doesn't resolve the dependencies in java files until the file is opened.
How do I fix this?
So, when the all the class files are deleted, it is unable to debug the code. While I try to run the code, it shows following error:
Error: Could not find or load main class com.application.Main
Caused by: java.lang.ClassNotFoundException: com.application.Main
Environment
- Operating System: Windows 10
- JDK version: 11+
- Visual Studio Code version: 1.74.3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、JDK 11+ と VS Code 1.74.3 を使用して、報告されたマルチモジュール Maven プロジェクトの問題を Windows 10 上で再現します。プロジェクトが開かれている間の target\classes の出力を調査し、その後、生成された com ファイルが削除されることなく、依存関係の解決とデバッグが復旧するかを確認します。完了条件は、原因を特定し、クラスファイルの削除と、それによって発生する ClassNotFoundException に対する修正を文書化または実装することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100