Help with java.net.URL
Posted: 30 Aug 2007, 18:27
Hey
Doing a JAVA project for school.
My problem:
I need to open an external document (.html in this case) from within a Java application. It needs to be opened with whatever is the default opener for that type of file on the machine the app is running on (so Internet Explorer for a .html on most Windows machines etc.)
The file is supposed to be opened when the user clicks a button, or menu option from within the Java app, so it uses the ActionListener etc
I can specify the file with java.net.URL easily enough, but I can't find a method to open the thing with its default program.
Any ideas?
Doing a JAVA project for school.
My problem:
I need to open an external document (.html in this case) from within a Java application. It needs to be opened with whatever is the default opener for that type of file on the machine the app is running on (so Internet Explorer for a .html on most Windows machines etc.)
The file is supposed to be opened when the user clicks a button, or menu option from within the Java app, so it uses the ActionListener etc
I can specify the file with java.net.URL easily enough, but I can't find a method to open the thing with its default program.
Any ideas?