Help with Multi Jar Files

W

Wayne Gibson

Hi,
I need some advise with a java applet. I am nearing completing of the
project and am getting a little concerned how long it is taking for the
applet to load. I have developed the java applet with Jbuilder using the
JDK 1.1.8 as I need to support users with that haven't installed the latest
version of the Java Runtime.

So I have been searching the internet trying to see how to speed up the
loading process. I've notice that some applets on the web have a loader,
that displays a nice background image and shows a progress bar of the jar
files downloading. These applets aren't using the Java 1.4 parameters to
display a background.

So I've been trying to achieve this, but for the life of me I can't find any
examples of how to do this!!! Which is very frustrating as I know it's
possible.
Whilst on my search I noticed a few people talking about preloaders, where
the jar files are downloaded on a previous page showing a progress bar.
Then once all the files have been download it redirects the user to the page
with the applet.

So the question is, does anybody have any examples for either of the two
options?

Many thanks

Wayne
 
W

Wayne Gibson

Thanks for the link..
I'm already using an obfuscator which does reduce it slightly..

But really want the user to be sitting there waiting for it load, so feed
back is the solution...

Any other ideas?
 
I

IchBin

Wayne said:
Hi,
I need some advise with a java applet. I am nearing completing of the
project and am getting a little concerned how long it is taking for the
applet to load. I have developed the java applet with Jbuilder using the
JDK 1.1.8 as I need to support users with that haven't installed the latest
version of the Java Runtime.

So I have been searching the internet trying to see how to speed up the
loading process. I've notice that some applets on the web have a loader,
that displays a nice background image and shows a progress bar of the jar
files downloading. These applets aren't using the Java 1.4 parameters to
display a background.

So I've been trying to achieve this, but for the life of me I can't find any
examples of how to do this!!! Which is very frustrating as I know it's
possible.
Whilst on my search I noticed a few people talking about preloaders, where
the jar files are downloaded on a previous page showing a progress bar.
Then once all the files have been download it redirects the user to the page
with the applet.

So the question is, does anybody have any examples for either of the two
options?

Many thanks

Wayne
Maybe this will help

'How to Use Progress Bars'
http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html

'How to do a fast Splash Screen in Java'
http://www.randelshofer.ch/oop/javasplash/javasplash.html


--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
R

Roedy Green

But really want the user to be sitting there waiting for it load, so feed
back is the solution...

Use Java Web Start. Then you load only once unless the code changes.
 
W

Wayne Gibson

Hi,
thanks for the information..

But isn't Java Web Start used for deploying Standalone Java Applications?
I would love to be able to use an installer, but I have to cater for users
that aren't able to install applications on their machines.
So the Jar file is the only option :(

Also I have write it with the Java 1.1 jdk in mind.

Any other Ideas?

Wayne
 
W

Wayne Gibson

Thanks for the links,

I've had a quick look at the fast splash screens. The only problem that I
can see is that this is based on an application as opposed to an applet. As
my Applet might be a little large, the splash won't load until the Jar file
has been downloaded.

What I'm looking for is small applet that will display an image and progress
bar. That will then download the real applet updating the progress bar.
Then upon completing the download invoke the real applet.

Any ideas?

Thanks

Wayne
 
I

IchBin

Wayne said:
Hi,
thanks for the information..

But isn't Java Web Start used for deploying Standalone Java Applications?
I would love to be able to use an installer, but I have to cater for users
that aren't able to install applications on their machines.
So the Jar file is the only option :(

Also I have write it with the Java 1.1 jdk in mind.

Any other Ideas?

Wayne
No, actually Java Web Start does support the download of Applets. In
fact it is perfect for your situation. It will present a slash screen
and displays a progress bar while it downloads your applet and then
invokes it.

The only thing not sure about the 1.1 jdk requirement.

*The Applet-Desc Element*
Java Web Start has support for launching Java Applets. This support
provides easy migration of existing code to Java Web Start.

An Applet is launched using the applet-desc element instead of the
application-desc element. For example:

<applet-desc
documentBase="http://..."
name="TimePilot"
main-class="TimePilot.TimePilotApp"
width="527"
height="428">
<param name="key1" value="value1"/>
<param name="key2" value="value2"/>
</applet-desc>

The JAR files that make up the Applet are described using the resources
element as for applications. The documentBase must be provided
explicitly since a JNLP file is not embedded in an HTML page. The rest
of the attributes correspond to the respective HTML applet tag elements.

The main-class attribute is used instead of the code attribute. The
main-class attribute is assigned the name of the Applet class (without
the .class extension). This attribute can be omitted if the Applet
class can be found from the Main-Class manifest entry in the main JAR file.

Note: Applets must be packaged in JAR files in order to work with Java
Web Start.


Look at this
http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html

Also http://mindprod.com/jgloss/javawebstart.html

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top