Applet Run, How?

Posted on 2007-08-08
Last Modified: 2010-03-30
Hi, i wish to run my applet in web. I read the web and i understand if i need to run a single file, i can simply put this in my jsp page.

   CODE="Bubbles.class" WIDTH=500 HEIGHT=500 ALIGN=MIDDLE>
<P><IMG SRC="bubbles.gif" ALT="[GIF image (2k)]"><BR>
An extract from a snapshot of <CITE>Bubbles</CITE> animation
by <A HREF=""></A>.</P>

Question 1:
If i want to run my class file, single class file, where should i put my physical class file? This is the sample of my structure of my web app.
  - JSP
      - my JSP file location

Question 2.
If i am running the applet that required some addtional jar file, where and how should i put it?
same directory let say i am using.

  - JSP
      - my JSP file location

Thank you.
Question by:penang67
    LVL 16

    Expert Comment


    Author Comment

    thanks, i also have studied this URL but also not able to answer my above question.

    Ellandrd, can yo uspend sometime and explain to me in here?

    What i want to achieve is simple, just wish to run it in browser with html / jsp. What i am facing now it's failed to located my .class file or the .jar file. Where should i store it in my web application structure?
    LVL 16

    Expert Comment

    your JAR file should be in the same folder as your HTML file.

    <applet code='file.class' archive='file.jar' width='0px' height='0px'></applet>

    is your .java file inside your src folder when compiling and building your applet?

    LVL 16

    Accepted Solution

    and that URL tells you everything you need to know - there are further links at the bottom...
    LVL 92

    Assisted Solution

    Q1. Its going to look for them at the codebase u specified.
    If you get rid of that codebase then it will use the defaul which is the same directory as the page

    Q2. again put them in the same place as the page, and you'll also need to specify themm using archive attribute
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now