Don’t fear the main(). Over the years, we

Don’t fear the main(). Over the years, we

Over the years, we — the Java/JVM community — have developed a fear of writing public static void main(...) by hand. We either managed to get rid of it completely by using application servers, or limited it to a crippled form when using Dependency Injection frameworks like Guice or Spring . Is it the right way to go? On the contrary. The main() method — following the dictionary definition — is, or rather should be, the “chief in size, extent, or importance; principal; leading” method of our program (well, maybe not in size!...

Published in blog.softwaremill.com · by Adam Warski · 5 min read · August 18, 2023