i am having the following problem:
i wrote an application, in which the user can open some specific files. The user should be able to to select the editor, he wants to open the file with.
At the moment i am doing it with this piece of Code:
public void open(String path) {
try {
if(new File(path).exists())
Runtime.getRuntime().exec("notepad.exe " + path);
} catch (IOException e) {
}
}
if i would change the Editor to ultraedit.exe
for example, the Runtime wont be able to open it.
So now to my question, is there any way, to implement something like the open with
function windows is using, and return all possible editors for a specific type of file?
The extension of the file will be allways .ini