[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Applet Run, How?

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.

<APPLET CODEBASE="http://java.sun.com/applets/other/Bubbles/classes"
   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="http://java.sun.com/">java.sun.com</A>.</P>
</APPLET>

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.
/POC
  - WEB-INF
       -Lib
       -classes
  - 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.

/POC
  - WEB-INF
       -Lib
       -classes
  - JSP
      - my JSP file location

Thank you.
0
penang67
Asked:
penang67
2 Solutions
 
ellandrdCommented:
0
 
penang67Author Commented:
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?
0
 
ellandrdCommented:
your JAR file should be in the same folder as your HTML file.

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

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

ellandrd
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ellandrdCommented:
and that URL tells you everything you need to know - there are further links at the bottom...
0
 
objectsCommented:
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
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now