Remove or relocate Java icon in Dock I am using a MacBook Pro running macOS Mojave with the latest version of Java.

When i run my Java program, it shows 2 icons in the Dock. Is it possible to remove 1 or relocate both?

I cannot use a 3rd party hide program, it won't move if I drag it off the Dock. Does anyone have any methods to relocate or hide the icons?
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