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 | 2659 | July 2, 2021 | |
Proguard code obfuscation for spring boot 3+ maven applications | 3 | 1018 | August 15, 2024 | |
Obfuscated Jar is not running | 0 | 796 | March 3, 2023 | |
Java Springboot application failed to start post obfuscation | 3 | 1017 | February 9, 2022 | |
Incremental obfuscation not working | 5 | 364 | April 16, 2024 |