posted 20 years ago
Hey
I want to load a HTML page(that the program is creating) into a JEditorPane, but i get the wrong path!
Say that i have the html file in a catalog cald TESTPROG(TESTPROG\default.html) int this catalog(TESTPROG) i also got the project files(Im using JBuilder)
i using this cod
java.net.URL pageURL = getClass().getResource("TESTPROG\\default.html");
JEditorPane.setPage(pageURL);
this give me a error about error URL, i have tryed this to
JEditorPane.setPage(//"file:/c:/TESTPROG/default.html");
and this works, but the program will be installd in different computers(diffrent catalogs) so i need it to take the html file that is located right in its own catalog even if its on the D och the C drive and so on.
I hope you know what im talking about ?
//Jimmy