[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

problem in Applet embedding in HTML page

Posted on 2006-07-14
7
Medium Priority
?
294 Views
Last Modified: 2010-03-31
hai,
         i have some problem in the applet. I have a account in myjavaserver.com website. the account name is deeppra. I uploaded my applet program to this path to the server
/chat/Chat.java
in the Chat.java contains in the pakage deeppra.chat
then i created a html file to put the applet, but i gives error message like "Class not found"

this is the code i put in the html file to include the applet
<applet code="deeppra.chat.Chat" width=800 height=400></applet>

Then i saved the file in the root directory as
/Chat.html

Tell me whats the problem
0
Comment
Question by:deeppra
5 Comments
 
LVL 10

Expert Comment

by:mukundha_expert
ID: 17113248
>>pakage deeppra.chat

if thats your package, your class should be in --> deeppra/chat/Chat.java
0
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 17113287
you need to load your class file on the server, not your java file
and it should be the directory mentioned by mukundha_expert

/deeppra/chat/Chat.class
0
 
LVL 5

Author Comment

by:deeppra
ID: 17113347
yea i put all the files there
u can access the site with this url
ftp.myjavaserver.com
username:deeppra
pass:pradeep_


you can go there and see the things, there will be many files but u have all these files inside the chat folder.. u have all the code, class file and html file there

Thanks
0
 
LVL 4

Assisted Solution

by:Meritor
Meritor earned 100 total points
ID: 17113495
You must have put the class file in WEB-INF/classes directory or the .jar file in WEB-INF/lib directory
If you put your files over there, your html cannot get any applet because it has private access.
You have to put that class file or .jar file to any public access area. i.e. outside of WEB-INF directory.
0
 
LVL 10

Expert Comment

by:mukundha_expert
ID: 17119735
ya it should be class file,

place your class like this and try,

web-app
            --->html --------------------> index.html
                         --------------------> deepra --> chat --> Chat.class
            --->WEB-INF    

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 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