How do I open a file with the default associated program in Java? (for example a movie file)
Open the Control Panel. In the Control Panel, click the Default Programs option. Click the Associate a file type or protocol with a program option. In the Default apps window, scroll to the bottom and select Choose defaults by file type.
You can use Desktop.getDesktop().open(File file)
. See the following question for other options: "[Java] How to open user system preffered editor for given file?"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With