Solved

problem in Applet embedding in HTML page

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 159
factorial example 4 39
arguments to jar 5 26
Which non-HTML GUI front end to use with Java? 3 21
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

785 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