Found this
String application = "";
eg. if ( itemClicked.endsWith(".pdf")) {
application = "acroread5";
try
{ Runtime.getRuntime().exec(application);
}
catch (Exception ex) {
}
It looks promising, so I'm gonna have a look at trying that once I get the program running.