programming language
At first -considering the fact that you
ask if something like your pseudocode could be implemented in Java- let me say, that if you start learning Java
now it will be quite a long time before you actually can do what you want. Are you thinking about taking Java courses at University? That would make time less of an factor as far a learning is concerned, but they're not known for starting with the "practical side" of things.
I would wholeheartedly suggest using (and learning) a scripting language - Ruby, Pearl, Tcl. Those are freely available, have bindings to GUI-Toolkits (like TK) which make building a graphical interface a matter of
tens of lines of code and are usuable cross-plattform. What is a thing to consider as DOM is, too. And the scripts can be "wrapped" into standalone .EXEs which you can distribute.
I don't think they would pose too much of a performance problem in the time of 3 Ghz processors.
If you're interested in details, PM me. I could supply you with links etc. to a good bunch of free ressources on the net, trainers and manuals included.
algorithm
As alexti already pointed out, there are some "flaws" in your algorithm. His, on the other hand, looks overly complex to me. Something I would expect from a C++ programmer

Think he overlooked the fact that some -how do you call it?- "boundary conditions"? are already know at start:
E.g. you could can the map file for all provinces which have only 1 or 2 neighbours - those are the choke points. A "capital" must have at least 3, better 4 land neighbours, so if the number of desired "capitals" is known, you can simply compare it ot the number of "4"s and if those are sufficient, I think you needn't do much more besides checking for duplicates among the neighbours.
Don't have the time to go into further detail now, will look into it later...