Hans Island solution
Partition it north-south. That way, no one loses twelve miles of water and shelf, assuming the island could be made habitable. (Under the 1982 Law of the Sea Convention, "Rocks which cannot sustain human habitation or economic life of their own shall have no exclusive economic zone or continental shelf.")
Sint Maarten/St. Martin was divided between the Netherlands and France by the Treaty of Concordia in 1648. Story has it that a Dutchman and a Frenchman, starting at Oyster Pond, stood back-to-back and then walked around the coast to decide the location of the boundary. The Frenchman went north, armed with a bottle of wine; the Dutchman went south with a flask of Dutch gin. Result: 21 square miles for France, 16 for the Netherlands.
Peace-loving readers are invited to come up with inventive ways of establishing a Hans Island boundary line.
CORRECTION: While partition may yet be the only way to avoid war, my research was signally lacking on this matter. Whatever the Law of the Sea Convention says, Canada and Denmark signed a shelf delimitation treaty in 1973, ratified by the UN, that would preclude 12-mile claims based upon ownership of Hans Island. The boundary, developed with a computer program, was left incomplete for an 875-metre stretch, in the centre of which Hans Island lies.
Readers are invited to imagine bloodless ways in which a war might be fought, should the partition proposal fail.