Re: Open Html from Jar file

Discussion in 'Java' started by TS, Oct 15, 2004.

  1. TS

    TS Guest

    I have created a Java Client application which will run on a Windows 2000
    PC.
    I have created an Html file which I want to include in the Jar file.
    My question is, does anyone have a code example of how to display the Html
    file in the Jar file from the Client application. The PC this application
    will run on has Internet Explorer. So it's fine if the example diplays the
    Html document in I.E.

    Terry
    TS, Oct 15, 2004
    #1
    1. Advertising

  2. On Fri, 15 Oct 2004 13:00:20 -0400, TS wrote:

    > I have created an Html file which I want to include in the Jar file.
    > My question is, does anyone have a code example of how to display the Html
    > file in the Jar file from the Client application. ..


    <http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JEditorPane.html#JEditorPane(java.net.URL)>

    >..The PC this application
    > will run on has Internet Explorer. So it's fine if the example diplays the
    > Html document in I.E.


    If you need to resort to IE, you can use BrowserLauncher,
    but you would need to extract the HTML to disk first.

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.PhySci.org/ Open-source software suite
    http://www.1point1C.org/ Science & Technology
    http://www.lensescapes.com/ Images that escape the mundane
    Andrew Thompson, Oct 15, 2004
    #2
    1. Advertising

  3. TS wrote:
    > I have created a Java Client application which will run on a Windows 2000
    > PC.
    > I have created an Html file which I want to include in the Jar file.
    > My question is, does anyone have a code example of how to display the Html
    > file in the Jar file from the Client application. The PC this application
    > will run on has Internet Explorer. So it's fine if the example diplays the
    > Html document in I.E.
    >
    > Terry
    >

    For opening an html-file inside your jar-file use
    <http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getResource(java.lang.String)>

    --
    Thomas<dot>Fritsch<squiggle>ops<dot>de
    Thomas Fritsch, Oct 15, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lucy
    Replies:
    6
    Views:
    30,624
    steve
    Sep 7, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    566
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,717
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,751
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    656
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page