Bolivia has been landlocked since 1904, but has a navy with 5,000 personnel (patrolling the country's many large rivers and lakes) and... a naval academy! Which Peru grants access to the sea.
Of course, you'll note Austria isn't on that list.