Opening a file with Java

I need to tell the operating system to open the file using the default program used for this type of file. Just as if this file was double-clicked by a user under Windows.

The goal is, i.e. "Your PDF has been created. Click here to open it."

Regardless of platform, if possible ...

I do not know the exact terms for what I want, so if someone can update the tags, I would really appreciate it;)

+5
source share
2 answers

You need the Desktop class , and open () in particular.

. , .

+7

Java 6, Desktop.open() .

+4

All Articles