Protections
Control flow
Reshape the logic inside your methods.
Setting: protection.controlFlow, levels 0 through 5 (Off, Performance, Base, Security, Enhanced, Flow Break). This is flowguard's biggest protection — it rewrites the actual branching logic inside your methods so the order of operations is much harder to follow, instead of just hiding names or text.
Higher levels apply more aggressive rewriting. Performance keeps things light and fast; Flow Break applies the heaviest rewriting and will have the biggest effect on method size and speed. Try a middle level first and move up only if you need more protection and can accept the cost.
Protecting authentication logic
Setting: protection.authentication. A separate switch that adds extra startup checks and guards against process tampering, and also turns control flow on if it wasn't already. If you use this, run your program with -XX:+DisableAttachMechanism -XX:-EnableDynamicAgentLoading and without any startup agents — the guard expects a clean launch.
Test thoroughly at higher levels
Control flow rewrites real logic, not just metadata. Always test your protected jar after raising this level, and keep an unprotected build around for comparison while you're tuning settings.