Seems that if you can’t use java.awt.Desktop
you have to distinguish between the OSes:
Windows:
RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL <file.ext>
Linux:
edit <file.ext>
Mac:
open <file.ext>
HTH. Obviously, that is not very portable…
More Related Contents:
- How to read all files in a folder from Java?
- In Java, how do I parse XML as a String instead of a file?
- Getting the filenames of all files in a folder [duplicate]
- How do I get the file name from a String containing the Absolute file path?
- How to get absolute path to file in /resources folder of your project
- Determine if two files store the same content
- How do I use Java to read from a file that is actively being written to?
- Java, List only subdirectories from a directory, not files
- How to read a file from a jar file?
- What is the best/simplest way to read in an XML file in Java application? [closed]
- Access resource files in Android
- Accessing files with spaces in filename from Java
- How to convert .txt file to Hadoop’s sequence file format
- Desktop API is not supported on the current platform
- How do I get a sound file’s total time in Java?
- adding progress bar to each table cell for file progress – Java
- java IO to copy one File to another
- Reading Windows file summary properties (title, subject, author) in Java
- Using Unicode characters for file names inside a zip archive
- Get system uptime in Java
- Create file with given size in Java
- Find files in a folder using Java
- How to read a text file directly from Internet using Java?
- How to check a file if exists with wildcard in Java?
- Java System-Wide Keyboard Shortcut
- The system cannot find the file specified in java
- Get the file size in android sdk?
- java set file permissions to 777 while creating a file object [duplicate]
- Command Line Pipe Input in Java
- Write and read multiple objects to file