I\'m using a licensed API which has a method to acquire/release a license object from a license server that has a finite number of licenses. At the beginning of my applicati
you achieve this by never calling Sytem.exit(). In main() you create a "last line of defense" with
try { startApp(); } catch (Exception ex) { // do some logging } finally { releaseLicense(); }