I’ve been working on a rather extracurricular project (it’s not really a game at all) for managing files. Is there a way to open any File in the correct program, just by specifying the filename extension and letting the computer do the rest of the work? My current model requires that you find the correct program in a file chooser the first time you open that extension, and then opening it using the following:
Runtime.getRuntime().exec(program+" "+file.getAbsolutePath());
However, the person commissioning me to create this project says that that would be inacceptable. How can you access the filename extension-to-program association that I know the computer has?