The ship was built by the Koninklijke Maatschappij de Schelde in Flushing and laid down on 31 May 1916. The ship was launched on 6 August 1921, and commissioned on 1 May 1925. Later that year on 14 OctoberJava left the Netherlands for a journey to the Dutch East Indies. She arrived in Tanjung Priok on 7 December that year. On 29 July 1929 Java, the destroyers and, and the submarines and left Surabaya and steamed to Tanjung Priok. There the ships waited for the royal yachtMaha Chakri of the King of Siam and the destroyer Phra Ruang. After this the ships, without the submarines, visited Bangka, Belitung, Riau, Lingga Islands, Belawan and Deli. On 28 August that year they returned to Tanjung Priok. On 31 August that year she participated in a fleet review at Tanjung Priok. The review was held in honor of the Dutch Queen Wilhelmina of the Netherlands who was born that day. Other ships that participated in the review where the destroyers De Ruyter and Evertsen. On 23 August 1936 Java, her sister ship and the destroyers Van Galen, and were present at the fleet days held at Surabaya. Later that year on 13 November she and her sister and the destroyers Evertsen, Witte de With and Piet Hein made a fleet visit to Singapore. Before the visit they had practised in the South China Sea. While returning to the Netherlands she was sent to Gibraltar where she performed convoy duties during the Spanish Civil War in the Strait of Gibraltar from 1 April to 5 May 1937. After seven months of refit in the Netherlands she left for the Dutch East Indies on 4 May 1938. Along the way she performed convoy duties in the Strait of Gibraltar from 10 to 13 May and on 25 June that year she arrived in Tanjung Priok. On 13 October that year she collided with Piet Hein in the Sunda Strait. Java had to be repaired at Surabaya.
World War II
As the war with Japan began in December 1941, Java performed convoy duties in conjunction with British forces. On 15 February 1942, the force which Java was a part of was attacked by "Kate" bombers from the carrier although no damage was sustained. On 19 February, the ABDA naval forces sailed to Bali to attempt to disrupt Japanese landings there, and the Java took part in the Battle of Badung Strait. In this action, fire was exchanged with the Japanese but the Java took no damage. The Japanese successfully captured Bali while severely damaging the Dutch cruiser and a Dutch destroyer, and sinking the. On 27 February 1942 Java took part in the Battle of the Java Sea. During the evening phase of that battle she was struck by a Long Lance torpedo fired from the. The torpedo detonated an aft magazine and blew the stern off the ship, causing flooding in the aft engine room and setting fire to the anti-aircraft deck. As the ship took on a heavy list to port, the flooding caused the electrical equipment to shut down. The crew abandoned ship and the Java sank about fifteen minutes after being struck by the torpedo. 512 of her crew lost their lives in the sinking.
Wreck
The wreck of Java was discovered by a specialist wreck diving expedition on 1 December 2002, laying on its starboard side at a depth of. The wreck of her consort HNLMS De Ruyter which was sunk at the same time was also discovered on 1 December 2002, whilst HNLMS Kortenaer, sunk during the late afternoon of 27 February 1942, was discovered by the same group in August 2004. On 15 November 2016 the Dutch Ministry of Defence reported the disappearance of the wreck of Java, along with the wrecks of the De Ruyter and parts of the Kortenaer. The Royal Netherlands navy announced that they will launch an investigation, suspecting illegal salvage. In February 2017 a report was issued confirming the salvaging of the three wrecks.