Help with Multi Jar Files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne Gibson

    Help with Multi Jar Files

    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


  • Michael

    #2
    Re: Help with Multi Jar Files

    An additional suggestion: you could shrink the jar using a tool such as
    ProGuard (http://proguard.sourceforge.net/)

    www.mammothsoftware.com, Mike
    "Build Swing Applications in 5 Minutes"

    "Wayne Gibson" <wayne.gibson@r endersoft.com> wrote in message
    news:dq7o6k$sn5 $1$8300dec7@new s.demon.co.uk.. .[color=blue]
    > 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
    >[/color]


    Comment

    • Wayne Gibson

      #3
      Re: Help with Multi Jar Files

      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?


      Comment

      • IchBin

        #4
        Re: Help with Multi Jar Files

        Wayne Gibson wrote:[color=blue]
        > 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
        >
        >[/color]
        Maybe this will help

        'How to Use Progress Bars'
        This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components


        'How to do a fast Splash Screen in Java'



        --

        Thanks in Advance...
        IchBin, Pocono Lake, Pa, USA

        _______________ _______________ _______________ _______________ ______________

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

        Comment

        • Roedy Green

          #5
          Re: Help with Multi Jar Files

          On Fri, 13 Jan 2006 13:47:33 -0000, "Wayne Gibson"
          <wayne.gibson@r endersoft.com> wrote, quoted or indirectly quoted
          someone who said :
          [color=blue]
          >But really want the user to be sitting there waiting for it load, so feed
          >back is the solution...[/color]

          Use Java Web Start. Then you load only once unless the code changes.
          --
          Canadian Mind Products, Roedy Green.
          http://mindprod.com Java custom programming, consulting and coaching.

          Comment

          • Wayne Gibson

            #6
            Re: Help with Multi Jar Files

            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


            Comment

            • Wayne Gibson

              #7
              Re: Help with Multi Jar Files

              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


              Comment

              • IchBin

                #8
                Re: Help with Multi Jar Files

                Wayne Gibson wrote:[color=blue]
                > 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
                >
                >[/color]
                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="h ttp://..."
                name="TimePilot "
                main-class="TimePilo t.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


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

                --

                Thanks in Advance...
                IchBin, Pocono Lake, Pa, USA

                _______________ _______________ _______________ _______________ ______________

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

                Comment

                Working...