I don't think this check is necessary - should be hsndled by allowing the permission or not? There shouldn't be any need to hardcode something specifically for awt.