The thread below has the code to select the directory using JFileChooser: http://www.javaranch.com/ubb/Forum33/HTML/001305.html Once you have the file you can either "execute" the file and let the MIME type direct what browser gets opened: Process p = Runtime.getRuntime().exec(f); //opens with whatever application the user has specified for that extension type or you can NAME the browser and hope that the user has the application and that it is in the path: String runThis = "\"" + "ie.exe " + f + "\""; //create the command in quotes Runtime.getRuntime().exec(runThis); [This message has been edited by Cindy Glass (edited April 23, 2001).]
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jan 23, 2001
Hi Cindy, I tried to execute the code which is here.But it gives me application error when it tries to open the file.Why is that so? Thanks Seema
Joined: Sep 29, 2000
Which code did you try? and can you show us your version of it?