.class file opens instead of .java while debugging

前端 未结 9 644
北恋
北恋 2020-12-29 03:14

Current setup:

  • MainProject which is a Library Project

  • BranchProject which is a new projects and has MainPr

9条回答
  •  一整个雨季
    2020-12-29 04:06

    The problem is that the class file is preferred over the java (by default), here is how you can change that for Eclipse (tested on NEON 2):

    1. Right-click on the Project in the Project-Explorer, click Properties
    2. On the new window select: Run/Debug Settings
    3. Create a new configuration (or duplicate another one)
    4. Select the new config and click Edit...
    5. Go to the tab Source
    6. Select the Default and Remove
    7. Create a new path with Add..., select Java Library, then JRE System Library
    8. Create a new path with Add..., select the location where the sourcecode is by Workspace folder (if it is a project in the same workspace) or File System directory (it it is not)

提交回复
热议问题