You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Package private Main class using Java 25 is not found by build plugins #47309
* What went wrong:
Execution failed for task ':bootJar'.
> Error while evaluating property 'mainClass' of task ':bootJar'.
> Failed to calculate the value of task ':bootJar' property 'mainClass'.
> Main class name has not been configured and it could not be resolved from classpath /Users/snicoll/workspace/demo/matchmaking/playerprofile/build/classes/java/main:/Users/snicoll/workspace/demo/matchmaking/playerprofile/build/resources/main
It looks like the algorithm should be relaxed now that the main method does not need to be public (at least on Java 25+)
public class SDMStoreApplication {
void main() {
SpringApplication.run(SDMStoreApplication.class);
}
}
But it's causing the same exception as in this post. Can anyone please amend the spring-boot-loader-tools to remove the requirement on the main() method to be static? The issue seems to stem form here:
Activity
We can't make those package private just yet
Add support for finding package-private and parameterless main
mihaiapostol1995 commentedon Jan 9, 2026
Java 25 also allows this:
But it's causing the same exception as in this post. Can anyone please amend the spring-boot-loader-tools to remove the requirement on the main() method to be static? The issue seems to stem form here:
snicoll commentedon Jan 9, 2026
See #35785