microsoft / microsoft/vscode-java-debug

Cannot find main method for Maven project with subprojects

Đang mở
#1,006 5 bình luận 3 reaction 1 người được giao Xem trên GitHub

@testforstephen đang làm issue này rồi.

Từ ngày 1/12/2021.

ai-triaged bug launch
Ngôn ngữ chính
TypeScript
Star
591
Fork
429
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
19

Mô tả

Environment
  • Operating System: Arch Linux
  • JDK version: liberica-jdk-11-full
  • Visual Studio Code version: VSCodium 1.56.2
  • Java extension version: 0.77.0
  • Java Debugger extension version: 0.33.1
Steps To Reproduce

Given a Maven project with subprojects, such as this one
And VSCode is open with the cwd set to the root of the project
And I open a file in one of the subprojects (e.g. XChartDemo.java)
And the language server starts successfully
And I wait for long enough for the project to be loaded
When I try to run the main method

Current Result

Then I get an error message:

Error: Main method not found in the file, please define the main method as: public static void main(String[] args)

Source: Debugger for Java (Extension)
Expected Result

Then the main method is started

Log

lsp.log

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.