Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By Fubarable

Thread: Run Jar file from HTML page

  1. #1
    yahyaaa is offline Member
    Join Date
    Sep 2008
    Posts
    28
    Rep Power
    0

    Default Run Jar file from HTML page

    Hello Dears

    I have a jar file complied via netbeans, its contains GUI interface

    I want to embed this Jar file into HTML, so that I run it from the web page..

    can anybody help, I tried the Applets but didnt work...

    Thanks alot

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Run Jar file from HTML page

    Quote Originally Posted by yahyaaa View Post
    I tried the Applets but didnt work...
    "didn't work" doesn't tell us much that helps us help you. Please provide the important details if you truly need and want our help, details such as what type of GUI -- is it a JApplet or a JFrame? How did you try to display the applet, what your GUI code looked like? the HTML code? have you considered using Java Web Start instead?

  3. #3
    yahyaaa is offline Member
    Join Date
    Sep 2008
    Posts
    28
    Rep Power
    0

    Default Re: Run Jar file from HTML page

    Thanks a lot for your reply

    This is the HTML code

    <Html>
    <Head>
    <Title>Java Example</Title>
    </Head>

    <Body>
    This is my page<br>
    Below you see an applet<br>
    <br>
    <Applet Code="NewJFrame.class" archive="CIB_User.jar" width=200 Height=100>


    </Applet>
    </Body>
    </Html>


    ====
    CIB_User.jar is complied using netbeans and it extends the JFrame class
    For the Java web, Am not fimiliar with it, can you please give me hints so that I go and read a bit about it ?

    Thanks

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Run Jar file from HTML page

    Quote Originally Posted by yahyaaa View Post
    Thanks a lot for your reply

    This is the HTML code

    <Html>
    <Head>
    <Title>Java Example</Title>
    </Head>

    <Body>
    This is my page<br>
    Below you see an applet<br>
    <br>
    <Applet Code="NewJFrame.class" archive="CIB_User.jar" width=200 Height=100>


    </Applet>
    </Body>
    </Html>


    ====
    CIB_User.jar is complied using netbeans and it extends the JFrame class
    For the Java web, Am not fimiliar with it, can you please give me hints so that I go and read a bit about it ?
    Ah you can't create a JFrame and expect it to behave as an applet but rather need a class that extends JApplet. This suggests that you have not yet read the applet tutorial, and I urge you to do this before taking another step as it's all explained there.

    Luck!
    yahyaaa likes this.

  5. #5
    Join Date
    Sep 2011
    Posts
    1
    Rep Power
    0

    Default Re: Run Jar file from HTML page

    Hello, yahyaaa! You need to read this article How to Make Applets (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components) for resolved your issue and understanding how applet is worked. For example, in your case, NewJFrame.class should extend JApplet, not JFrame.

Similar Threads

  1. submit html page
    By erics44 in forum New To Java
    Replies: 3
    Last Post: 03-23-2010, 01:58 PM
  2. redirect to html page
    By simo_mon in forum Java Servlet
    Replies: 3
    Last Post: 02-12-2009, 06:18 PM
  3. convert html page to pdf
    By MarkWilson in forum Advanced Java
    Replies: 2
    Last Post: 09-03-2008, 12:14 AM
  4. Include Java file in HTML Page
    By kathyc in forum New To Java
    Replies: 2
    Last Post: 03-07-2008, 04:51 AM
  5. HTML page
    By bbq in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 04:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •