In 1883, the Boston, Massachusetts, the company that owns the full-rigged sailing ship Gerrymander gives the ship's captain, Captain Boll, six months to show a profit for the company in the Gerrymander's operations in the Netherlands East Indies. Facing both pirates and a trade exclusion policy that prevents him from carrying goods between ports in the islands, Boll looks for a way for the Gerrymander to make money. On Java, Boll encounters an Indonesian in Soerabaja whose life he once saved. The Indonesian tells Boll that native divers salvaged a fortune in diamonds from the sunken ship Pieterzoon, contrary to legend which says the diamonds were lost. The Indonesian directs Boll to a Chinese junk captain who has cargo that will lead Boll to the diamonds.
Upon contacting the junk captain, Boll discovers that the "cargo" actually is a woman named Kim Kim who knows the whereabouts of the diamonds. Kim Kim had been a dancer at the palace of the sultan, but the Chinese had taken her as a slave. Boll violates anti-slavery laws by buying her from the junk captain and smuggles her aboard the Gerrymander. Flint, the Gerrymander's first mate, discovers Kim Kim aboard the ship and finds out that Boll had purchased her; he blackmails Boll, threatening to turn Boll in to the Dutch authorities if Boll does not give him half the diamonds when they are found.
Posing as the naturalized Dutch citizen "Saint" Ebenezer, the pirate Pulo Besar also becomes aware that Kim Kim is aboard the Gerrymander. He tips off the authorities. They search the Gerrymander but do not find Kim Kim, who is hiding in a half-filled vat of water. Later, however, the Gerrymander's crew discovers her. Boll insists that they treat her well, but first he has to fight one of his sailors, Reeder, in order to protect her.
Boll constantly questions Kim Kim about the diamonds. At first, this angers her, but when he confides in her, telling her that he is impoverished but dreams of one day owning his own ship, she has a change of heart and decides to help him. She tells him that the diamonds are on what she calls the island of the fire god, Vishnu, which she visited as a child. Meanwhile, Flint incites the Gerrymander's crew against Boll by claiming that Kim Kim's presence aboard the ship has made Boll mentally unbalanced, and he leads a mutiny against Boll. When the mutinous crew confronts Boll, Boll offers the crew Flint's half of the fortune if they leave him in command of the Gerrymander. They agree, and the mutiny comes to an end. Flint is imprisoned. The Gerrymander sails on in search of Vishnu's island.
Boll and Kim Kim become romantically attracted to one another, but Kim Kim harbors a fear that Vishnu will become angry if Boll attempts to recover the diamonds from the island. Meanwhile, Besar and his pirates attack and seize control of the Gerrymander. The pirates take the Gerrymander and her crew to Besar's headquarters, on an island where he maintains an exquisite palace with servants and dancing girls. Besar has Boll imprisoned separately from his crew. In an attempt to get her to reveal the location of the diamonds, the pirates whip Kim Kim and show her that her mother, Bintang, is a prisoner of Besar's and has been broken by torture and imprisonment. Loyal to Boll, Kim Kim refuses to tell them anything about the diamonds. Giving up on torturing Kim Kim, Besar instead threatens to kill Boll unless she helps him find the diamonds. She agrees in order to save Boll's life. Flint and two other sailors from the Gerrymander also offer to cooperate with Besar in finding the diamonds.
Besar, his pirates, Kim Kim, Flint, and the two other sailors from the Gerrymander set sail for Vishnu's island in Besar's pirate ship. Meanwhile, the crewmen of the Gerrymander escape and set Boll free. They take back control of the Gerrymander from the pirates and set out in the Gerrymander in pursuit of Besar. To keep Besar from losing them during a moonless night, Boll and two of his men ride ahead of the Gerrymander in a longboat and send signals back to the Gerrymander to allow her to remain on Besar's tail. While they are doing this, one of the Gerrymander's sailors aboard Besar's ship, Wilson, sneaks off the ship and swims to Boll after overhearing where Besar is heading. Wilson's information allows Boll and his crew to identify Vishnu's island as Krakatoa.
Besar's ship and the Gerrymander both approach Krakatoa the following morning and find the island's volcano erupting. Despite their fear of the volcano, both the Gerrymander's men and Besar's pirates go ashore and climb the mountain, with each party racing the other to be the first get to a temple at the mouth of the volcano where the diamonds supposedly have been hidden. During the climb, Boll spots Kim Kim on the shore below. As the eruption becomes more powerful and lava begins to flow down the mountainside, Boll and the crew of the Gerrymander decide that the situation has become too dangerous for them to continue their climb to the diamonds; instead, they rescue Kim Kim, return to the Gerrymander, and head out to sea. Besar and his men also soon give up on finding the diamonds and put to sea in their own ship to flee the volcano. Boll expects the eruption to generate a huge tsunami, so he orders his crew to set the sea anchor and turns the Gerrymander toward Krakatoa to ride out the wave, which she successfully does. Besar instead makes the mistake of trying to outrun the tsunami, which capsizes his ship. He and his crew drown.
The eruption destroys Krakatoa, ending hopes of recovering the diamonds, but Boll tells the Gerrymander's crew that there is a 100,000-guilder bounty on Besar, which they will earn by handing Besar's island over to the Dutch authorities. In his capacity as captain of the ship, Boll then marries himself to Kim Kim on the deck of the Gerrymander as his crew looks on.Fred MacMurray as Capt. Boll
Vera Ralston as Kim Kim
Robert Douglas as Saint Ebenezer / Pulo Besar
Victor McLaglen as O'Brien
John Russell as Flint
Buddy Baer as King
Claude Jarman Jr. as Chess
Grant Withers as Jason Blue
Howard Petrie as Reeber
Paul Fix as Wilson
William Murphy as Ahab
Sujata Rubener as Dancer (as Sujata)
Philip Ahn as Gusti
Stephen Bekassy as Lieutenant
Fair Wind to Java was filmed on Point Dume in Malibu, California, and on the Republic Pictures backlot in the Studio City district of Los Angeles, California. Vera Ralston claimed that shots of Java inserted in the film were made by John Ford, though other sources claim location shots were done in Hilo, Hawaii, by Bud Thackery.
Howard and Theodore Lydecker filmed the ship and volcano sequences for Fair Wind to Java on Mono Lake in Mono County, California, using models. A 26-foot (8-meter) model of the Gerrymander was built, as was a model of Besar's lateen-rigged pirate ship and a miniature volcano, constructed on one of the rocky outcrops along the lake's shoreline, to serve as Krakatoa. Miniature palm trees and huts were placed along the shore of the lake to simulate the Indonesian coast. For the final eruption, bags of cement were used to simulate Krakatoa's immense volcanic plume. The remains of the movie's model volcano at Lake Mono still existed as of 2014 and had been adapted for use as a field base for bird researchers.
The tsunami scenes depicting the Gerrymander riding out the wave and the sinking of Besar's ship were created by filming the two model ships in the Pacific Ocean surf on a California beach.
The plot of the 1969 disaster film Krakatoa, East of Java, which tells the story of an attempt to salvage a fortune in pearls from a submerged shipwreck perilously close to Krakatoa during its 1883 eruption, bears many similarities to that of Fair Wind to Java.
After the University of California, Los Angeles Film and Television Archive restored Fair Wind to Java with funding from The Film Foundation, Martin Scorsese presented a showing of the film in 2006, calling it "the epitome of a Saturday afternoon matinee picture."