Solved

problem in Applet embedding in HTML page

Posted on 2006-07-14
7
242 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
7 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 25 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 25 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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 …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

744 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

10 Experts available now in Live!

Get 1:1 Help Now