Click to See Complete Forum and Search --> : Running Applets Offline
priyar
November 8th, 2001, 12:10 PM
Hi,
Is it possible to download the applets and the necessary files necessary to run, to the local machine and run them when the user is not connected to the internet.
fo instance, I Have two applets, one gif, txt file etc..When the user is connected to the internet, he connects to the website and uses the website as normal, but if he is offline, how do I make all the applets run from his local machine???
IF this is possible,
Please give me any suggestions of how this can be done?
Thank you
Priya
fzamora
November 8th, 2001, 01:42 PM
You need the class file i.e. "SomeApplet.class"...
Usually by viewing the source code of the page you will find <Applet source=SomeApplet.class name=SomeApplet width=300 height=400></Applet>
The problem is that there may be other applets that some applet uses as well some IMAGES from somr relational location on the server. You would need these as well. Your best bet is getting in touch with the person whose applet you want to borrow and that way they can provide you with all the necessary files.
Fernando Zamora
Norm
November 8th, 2001, 07:02 PM
To use an applet on your local machine, create an HTML file with an <APPLET tag and put it in a folder with the applet class files and other files it needs. When you open the HTML file in a browser, it will read the applet class files and start the applet. There are many path problems that you can have that are hard to make suggestions for now. The simplest case is when all the files are in the same directory. It all depends on how the applet refers to them.
This is a very common way of testing applets. I'm suprised you haven't seen examples of this yet.
Norm
priyar
November 12th, 2001, 12:09 PM
Hi,
I am sorry for not being clear on the questions..
My actual doubt was ..if
I had to create a website with applets and make those applets available to the end user, both when connected to the internet and also when he/she is offline.
I guess, it can be done by caching..but not sure , and I that is why I had to post the question
thank you
Priya
Norm
November 12th, 2001, 06:54 PM
Yes, you can place the same HTML and all other needed files on a server that is addressed by a URL: www.place.com/TheHTML.html
or you could place it on the users' disk in a folder so that it is located by something: file://C:/aFolder/TheHTML.html.
Then there is the maintenance problem of keeping them in sync.
On the Windows OS you can make a desktop shortcut that will start the browser and have it open that HTML file.
Norm
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.