Solved

problem in Applet embedding in HTML page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exception after setting jdbc session management 2 52
firstswap challenge 20 68
@SBGen Method 3 38
servlet example 17 10
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

867 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

18 Experts available now in Live!

Get 1:1 Help Now