He developed his son's marriage to maintain peace
The king's decision-making became clouded in his senior years. He started a foreign policy that combined unhappiness with strong opposition. James devised a scheme to have his heir Charles wed to a Spanish princess. The possibility of a Spanish dowry from a marriage between Charles and Infanta Maria Anna was another potential source of revenue. James found the so-called "Spanish match" approach to be appealing as a means of preserving peace with Spain and avoiding the additional expenditures of war. James may have prolonged the negotiations for almost ten years since it was possible to maintain peace just as effectively by continuing the negotiations as by concluding the match.
The Howards and other pro-Catholic clergy and diplomats—collectively known as the Spanish Party—supported the program, but Protestant England had a strong mistrust of it. James gave Sir Walter Raleigh explicit instructions not to confront the Spanish when he was released from prison in 1616 and set out on a quest for gold in South America. Walter Raleigh, Raleigh's son, was killed fighting the Spanish, and his voyage was a complete disaster. James had Raleigh put to death upon his return to England, much to the ire of the populace who opposed the appeasement of Spain.
Initially, at odds with Prince Charles, the duke of Buckingham eventually joined forces with him in an alliance from which the monarch was largely cut off. James was quickly aging at this point, and for the final 18 months of his reign, he effectively had no power to exercise; Charles and Buckingham made the majority of decisions. James passed away at Theobalds, his preferred country home in Hertfordshire.