Is it possible to start other application that are installed on the system with my java app and pass a file as a parameter to them? I have a client which receives videos from a server and I want my client program to start, lets say the VLC player with the file that I received. How do I manage to do that?
Share
Use
Desktop#open(). It will launch the platform default associated application to open the given file.No need to hassle with
Runtime#exec()orProcessBuilderfor which you would have to add platform detection and to write platform specific logics for.