Unfortunately, there is no way to "simply print a file". Java knows what to do with certain file types (e.g. text and PostScript), but in general only an application that knows what to do with a given file format can print a file (say, a web browser for an HTML file, or Adobe Reader for a PDF file). That's why the Desktop class uses the application that "owns" the file to print it.
A smart printer can help (e.g., some printers know what to do with PDFs), but generally they need something like PostScript or PCL as input, not just any file format.