Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 578850

Summary: java.lang.module.FindException when running a modular project configured by gradle
Product: [Eclipse Project] JDT Reporter: Nir Lisker <nlisker>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 4.22   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
test project none

Description Nir Lisker CLA 2022-02-20 08:55:42 EST
Created attachment 288081 [details]
test project

Attached a sample project configured by gradle.

When it is run from gradle, there is no issue. When it is run from Eclipse by right-click on the main method and running as Java application, the following error occurs:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module lombok not found, required by test
Comment 1 Nir Lisker CLA 2022-02-22 05:50:29 EST
User error: lombok should be defined with 'requires static' in module-info.java because it is not needed during runtime, which is why it built fine but didn't run. How it worked directly from Gradle I'm not sure of.