For almost a year he and his fellow Kiwis went to various islands like Munda, Guadalcanal, Lombari and Savo, where they would clear the jungle area before erecting portable tubular 60-foot high towers to which their radar antennae were attached.
The towers gave the New Zealanders clear range over the jungle growth.
They also dug fox-holes as Japanese bombers were constantly bombarding them, day and night.
American PT boats patrolled the islands and provided support for the radar units.
Mr Barham saw four PT boats get hit off Lombardi with many of their crews killed or wounded.
He, along with some Americans, swam out to help the survivors and managed to retrieve a boat's Stars and Stripes flag which he kept as a souvenir.
The future US President John F Kennedy, commander of PT 109, was in Lombardi at the same time as Mr Barham.
The Kiwi can recall shaking hands with the future president, who was assassinated in 1963.
Mr Barham survived a belly landing in a DC3 while being transferred from Guadalcanal to New Caledonia.
The aircraft began skimming the tops of the waves before its forced landing.
The screaming of personnel was deafening as they were tossed around like dummies, he remembers. It seemed to go on forever, then the plane came to a stop.
The personnel onboard sat in total silence for a good minute with sweat rolling down, some crying and others stunned but relieved. Battered and bruised, the Kiwi contingent wondered how they were ever going to get off the islands.
In New Caledonia the Kiwis spied a number of American flying jackets hanging up in one of the huts.
Nobody was around and the Kiwis helped themselves to one each of the jackets.
The one that Mr Barham “borrowed” must have been made for a 6' 6” tall man as it came down to below his knees.
Mr Barham reckons he could hear his old mum's words, “Thou shalt not steal”.
She was a devoted Catholic.
Mr Barham saw an army guy going back to the Pacific and asked him if he would like to buy it.
The price was “just buy me a beer next time we meet”.
The Kiwi said the Americans were good blokes.
They kept the Kiwi sailors supplied with cigarettes and their food “wasn't too bad”.
Mr Barham finally got his wish when he was drafted to HMS Gambia as a radar operator.
The vessel was part of the British fleet in the Pacific and had a major role of defending our aircraft carriers.
Life on board was “pretty dangerous” experiencing daily concentrated kamikaze air attacks and the possibility of torpedo attack.
Mr Barham's radio radar observation post was a small hub perched 80 feet above the deck.
The deafening sound when the forward guns were blazing and the vibrations were such that at times the crew expected their hub to be blown apart.
The experience of being in a war against suicide Japanese pilots was something that those sailors will never forget.
What kept many of the sailors going was their daily tot of rum — they felt it helped them to relax, calmed their nerves and made them feel ten feet tall and bullet proof.
HMS Gambia was ordered to Tokyo Bay to witness the signing of the Japanese surrender in 1945.
The vessel was one of 250 allied war ships anchored to witness the signing on board the USS Missouri.
At the time Mr Barham did not appreciate that moment in history. To him it was a lot of hoo-hah just to see a lot of top brass signing a piece of paper. He just wanted to get home.
Auckland's wharf was chock-a-block with families and loved ones waiting to greet the sailors home from the war when the Gambia sailed into port.
The ship's company paraded up Queen Street and were treated to a great reception.
“Drinks were free, the blokes would shake your hand and the girls would kiss you.
“It was so good to be back on home soil — we were the lucky ones.
If asked was it all worth it, most of the sailors would have replied, yes, it was an adventure, Mr Barham believes.
He had endured the boredom of coastal radar, survived the hell of the tropics, a plane crash, kamikaze bomber attacks, seen many sailors killed and was at the historic signing of the Japanese surrender.
His adventure was over.
When his mother greeted him her first words were, “I hope you have been going to church?”
He knew that he was truly home.