Adapt JLink sample to both 2.x and 3.x
4 files changed