Java in web page using object tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    Java in web page using object tag

    I'm going to tinker with Java this week and hope someone can get me off on the right foot. I don't recall but did applets fall out of favor for some other method? In any case, I wrote a simple "Hello, World" that runs in the console and I'd like to insert it into a web page but I'm unsure of the correct modern way to do this. I presume the <object> tag is used rather than <applet> but I want to use <object> anyway. Though I've gotten it to work somewhat, it's not stable and I really don't understand what values to use for the attributes.

    So, I have compiled HelloWorld.clas s. How do I use <object> with this to insert it into a web page?
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Well maybe this is working after all. This is what I do:
    Code:
    <object classid="java:HelloWorldApplet.class" type="application/java" width=200 height=200 ></object>
    It works in FF and Opera but Chrome either displays a gray box or "missing plug-in", which I haven't looked into yet, but is this the right way to do things?

    Comment

    Working...