You should be able to right click on the icon in the dock and select hide. This should hide one of the icons. See image
Remove or relocate Java icon in Dock
You should be able to right click on the icon in the dock and select hide. This should hide one of the icons. See image