Onload is done first by class then by DOJ. So in this case if the seat available is in business, the more junior business class passenger would get the seat. There will be no upgrade of Y pax as long as there is someone eligible for travel in J on standby.
This has been confirmed by various staff travel sources in writing several times.
If the available seat is in economy probably the more senior would get it, but this I do not know for sure.