How to execute an applet program written in java

Hi friends. Can any one tell me how to execute an applet program.

Replies

  • Kaustubh Katdare
    Kaustubh Katdare
    Re: How to exicute an applet program written in java

    rama_krish627
    Hi friends. Can any one tell me how to execute an applet program.
    You'll have to embed it in HTML. Do you know how to do that?
  • shalini_goel14
    shalini_goel14
    Re: How to exicute an applet program written in java

    rama_krish627
    Hi friends. Can any one tell me how to execute an applet program.
    Hi rama_krisha

    Applets can be executed in 2 ways:

    1. Executing the applet within a java-compatible web browser.
    For this write html code that has APPLET tag.
       
       
       
    Now simply run this file as a normal html file.

    2. Using an applet viewer. Applet viewer executes your applet in a window. This is fastest and easiest way to test your applet.
    In this make a separate file AppletHtml.html of same code as above.
      
      
      
    Then run above file as following command:
    C:\>appletviewer AppletHtml.html


    3. Better is one more way which is more commonly use - Simply include a comment at the head of you Java file/program
    /* 
    
       
    */
       
    Then execute the appletviewer as told in point no2.

    Hope I am correct and can be helpful .Others can correct me. 😀
  • rama_krish627
    rama_krish627
    Re: How to exicute an applet program written in java

    ya it's working. but the last one is not working.
  • shalini_goel14
    shalini_goel14
    Re: How to exicute an applet program written in java

    rama_krish627
    ya it's working. but the last one is not working.
    Hi rama_krish,

    What is not working? What steps you followed to do so. Better share your program here if you have no issues with it. 😀
  • sookie
    sookie
    Re: How to exicute an applet program written in java

    Hi rama_krish627,

    To make the last case working, you need to follow following three steps

    Step # 1: Edit your Java source file.Add following lines of code in your java class file
    /*
    
       
    */
    
    Step # 2: Compile your program
    Step # 3: Execute the appletviewer , specifying the name of your applet's source file. For eg., if your applet's source file(or your java program only) is in folder I:\JavaSrcCode then open command prompt ->switch to the location of your java(or applet ) source file-> type following command at it
    I:\JavaSrcCode>appletviewer MyFirstApplet.java

You are reading an archived discussion.

Related Posts

hey... i'm final year cs student... i want to do my project in networkin... pls suggest some topics... give me details on digital signature n digital certificated
give me some info about various companies offerig V.T coudses
Dear CEans, Being a popular forum we continue to attract spammers on CE Forums. Most of the spammers aren't posting robots, but real humans who are paid to post advertisement...
A design plant for the manufacture of 100.000 matric tons of propylene glycol using continous proces? pls send in the format of project resarch
Hi, I'm a Mechanical engineering student from Helena, Mt USA. Just curious if theres anyone nearby.