Hi,
I am not sure where are you stuck, but i believe you have to pass image enity as input to java action which creates barcode for you and then you can show that image entity(now barcode) to some page where users can scan that bar code and they will be redirected to URL that you pass while creating it.