Java code for Bitcoin Mining?
One of the very fist GPU miners was in java using OpenCL.  It was called DiabloMiner and you can find the source here;-

https://github.com/Diablo-D3/DiabloMiner

It hasn't been updated the the past two years but it is still fully functional.