File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes few confusions abt applets! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "few confusions abt applets!" Watch "few confusions abt applets!" New topic

few confusions abt applets!

reehan ishaque
Ranch Hand

Joined: Mar 25, 2001
Posts: 54
im developing a web based chat server using applets. im new to applets so im having some confusion in my mind and want answers to some of my questions.
1) when applet is downloaded on client machine n running in the browser, is this running in client machine's memory space. can i view applet source code?
2) if i want to import some classes(residing on the server) in my applet class how can i make those classes available to my applet after it has been downloaded to the client machine. where should i put those files?
3)in case of private chat every client will chat with every other client. can applet send data to other client machine directly?
4) any suggestion how to implement this chat server?
hope u ppl will reply. thanks
reehan ishaque
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
The place to go is (of course):
I'll try to give you a few answers anyway.
1) Yes the downloaded applet code will run on the client machine. The browser (I really only know how IE 5.5 behaves) will cache the class (or jar) files on the client machine. So in order to view the source, you would have to decompile the cached class files.
2) My suggestion. Put the classes you need together in a jar, then make the jar available from the webserver that will host your applet code, i.e. put the jar in the same directory as the class or jar containing your applet.
Then put the <PARAM NAME=ARCHIVE VALUE="comma separated list of jar files"> tag in the html source for your applet launching webpage.
3) No, an applet can only communicate (open sockets) with the server from which it originated.
4) I don't know where to start
Good luck!
I agree. Here's the link:
subject: few confusions abt applets!
It's not a secret anymore!