Good day!
I got a "fast" question about a problem I'm currently unable to solve:
I'd like to display a html file in a Java application.
Displaying a html file from an url (such as
http://www.google.com) works, but my html file is a local one.
Its locate in the project's subfolder "Manual".
Which "url" do I pass to the JEditorPane's setPage method to display the index.html file (Manual/index.html) ?
Any help is appreciated!
Thanks in advance!
edit:
Solution: (Thanks to damocles!)
String manualFile = "file://";
java.io.File currentDir = new java.io.File("Manual/index.html");
manualFile += currentDir.getAbsolutePath();