Hello, I’m new to this and I’ve been tasked with obfuscating and encrypting a single-module Spring Boot project that runs on JDK 17 using ProGuard. While I’ve managed to build the project successfully after obfuscation, I’m facing an issue where the obfuscated JAR fails to start, giving me an error that says, “Error: Unable to locate or load main class org.springframework.boot.loader.launch.JarLauncher. Reason: java.lang.ClassNotFoundException: org.springframework.boot.loader.launch.JarLauncher.” On the other hand, the non-obfuscated JAR starts up just fine. In trying to resolve this, I added -keep class org.springframework.boot.loader.JarLauncher to my ProGuard rules, only to find out that this class seems to be missing from my project. How should I go about resolving this problem?
Related Topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Cannot run Jar file after obfuscate with proguard | 4 | 2557 | July 2, 2021 | |
Proguard code obfuscation for spring boot 3+ maven applications | 3 | 868 | August 15, 2024 | |
Java Springboot application failed to start post obfuscation | 3 | 984 | February 9, 2022 | |
Incremental obfuscation not working | 5 | 350 | April 16, 2024 | |
Call for upvotes to add ProGuard obfuscation configuration to Spring Initializr (start.spring.io) | 0 | 77 | June 7, 2024 |