Stack overflow in runtime wizard for app servers less than as6
JBIDE-17218 replaced deprecated classes in api-safe manner, added comments where appropriate.