Results 1 to 5 of 5

Thread: Java + html

  1. #1
    GabWit is offline Member
    Join Date
    Jan 2009
    Posts
    11
    Rep Power
    0

    Default Java + html

    I know there's a code that loads your java file into html but forgot it. Anyone know of one, your help will be greatly appreciated.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    You mean an applet?

  4. #4
    GabWit is offline Member
    Join Date
    Jan 2009
    Posts
    11
    Rep Power
    0

    Default

    Yes I meant an applet, I figured out the problem

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Best explanation is embedded Java class in HTML. You cannot link *.java file into the HTML page as an applet.

    Here is a simple way to do that, assume that you Java class file name is MyApplet.java.

    Java Code:
    <html>
        <body>
             <applet
                 code = "MyApplet.class"
                 height = "100"
                 width = "100">
             </applet>
        </body>
    </html>

Similar Threads

  1. Java String to html var
    By tman563 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 02-17-2009, 03:59 PM
  2. How can I include a html file in html textarea?
    By surya_dks in forum New To Java
    Replies: 2
    Last Post: 10-04-2008, 08:20 AM
  3. Java Applet HTML
    By ownlol in forum Java Applets
    Replies: 4
    Last Post: 07-21-2008, 03:59 AM
  4. convert html to text using java
    By praveen@asia-mail.com in forum New To Java
    Replies: 1
    Last Post: 11-14-2007, 03:08 PM
  5. calling a java class from html
    By Ed in forum Advanced Java
    Replies: 1
    Last Post: 07-08-2007, 01:58 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
  •