I would like to know how to open an HTML page in IE or netscape from a java application. I have created an on-line help for the user guide and I would like to open it from a menu. I know that I could open it with JEditorPane, but I think a browser might be better since I used <frame> in my online documentation. Or, do you guys think JEditorPane would be a more appropriate choice.
I have another question for you. How do I specify the absolute URL for an html file on my local file system? I tried file:///d:/html/UserDoc.html, and got the following exception while executing JEditorPane.setPage(url) :
Originally posted by Ronnie Phelps:
Is there a reason why I have 1.4 but I can't seem to locate javax.jnlp.BasicService ? Is it not included with the other api's???
(1) How do I specify the relative URL ?
My directory structure is the following:
HelpViewer.java displays the on-line help document.
It is in suncertify.client.gui package.
The on-line help documents are in the root. Therefore, for me to refer to the on-line help document in HelpViewer class, I have to use
getClass().getResource("../../../MyUserDoc.html"), is that correct?
I don't think that's the right way to specify the relative path.
The only time my on-line help comes up is if I move the html document to the same directory as the HelpViewer class.
(2) My snap shots are still not displaying even if I don't use absolute URL. The problem might be that I put all the snap shot files in a separate directory from the main html directory. e.g. Snap shots are in html\bmp and all the html files are in html directory. Do you think this might be causing the problem?
(3) I did not understand fully about jarring up the html files... Are you serving the html files out of a jar file? Or the jar files is the top level jar file that you submitted to Sun. And when the grader runs the problem, the html directory is just a regular directory.
(1) The relative path is only for going forward (if a you have a directory inside the current directory), what if I want to go backward. For instance, if I have <b>suncertify\client\gui</b> for the java source code, but the help\help.html resides in <b>suncertify\client</b>?
(2) I compiled all my class files into the classes directory, and I noticed that when I jar everything up, the html files have to be in the classes directory as well. Is this true?
Since I am going to have a Server User Guide and Client User Guide, do I need to create a combined one and put it at the root directory of the submitted project for the users to use without starting any program?
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
how do I do my own kindle-like thing - without amazonhttps://coderanch.com/t/711421/engineering/kindle-amazon