Splitting JARs for faster applet start time

Hi.
I have a remote web client downloading an applet (packaged in a single JAR) from the server.
Problem: JAR file is 3.5MB and takes quite a time to get server->client over dial-ups.
Need: Some way of reducing initial startup time for the applet so the user doesn't have to wait 10min before seeing anything.
Here are the options I see so far...
Option 1
Split the JAR file into smaller JARs, the 'main JAR' has the applet GUI stuff and the 'extension JARs' have the applications launched from applet.
Option 2
Some way of 'dynamically loading' the classes from server either 'as needed' or automatically in the background, after the main applet GUI is loaded.
Option 1 I have tried but it seems that the applet actually does NOT start until ALL the JARs have been downloaded. Which doesn't really help reduce anything.
Option 2 I need a way of implementing?
Any help would be appreciated.
Taha
[email protected]

3.5mb jar?????
What you are packing into the file?
You should look into using Java WebStart -- it will download the applet and keep it locally for the subsequent use (doing away with having to keep downloading it).
;o)
V.V.

Similar Messages

  • Vote here for decreasing cold start time...

    Please vote or add a comment here if you would like the option of preloading the JVM to decrease cold start times for applets and applications:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6346341
    Thank you.
    Dennis Klotz

    Pre-loading the JVM will increase the boot time of my
    machine.
    Can't you think of a workaround yourself? If you have
    your machine run a small Java application at boot
    time, it will already load the JVM.The RFE states that this will be an "option".
    So in your case you would never turn the option on....
    But to answer your question, this isn't a single user running into a problem. If it was then your solution would make perfect sense. In our case we are talking about a product that goes out to customers and I need a solution that is a bit more professional. :)
    -Dennis

  • Retrieving .txt file from jar for an applet

    I guess this is a newbie question but i checked the tutorial sessions and i am doing exactly what it says there but still...no luck:
    I'm trying to access a .txt. file stored in the .jar file where my applet .class file is stored. I'm using:
    String s = "myfile.txt";
    // get current Class loader
    ClassLoader cl = this.getClass().getClassLoader();
    FileInputStream is = new FileInputStream((cl.getResource(s)).toString());
    BufferedReader in = new BufferedReader(new InputStreamReader(is));But when the applet is viewer from the browser or from the appletviewer, i'm getting the FileNotFoundException:
    java.io.FileNotFoundException: jar:file:\C:\FeatureSelection\sFeatureSelection.jar!\myfile.txt (The filename, directory name, or volume label syntax is incorrect)
    I tried to use the following instead:
    FileInputStream is = new FileInputStream((myApplet.class.getResource(s)).toString());orFileInputStream is = new FileInputStream((getClass().getResource(s)).toString());but the same exception is still there.
    The jar file and the html file are all stored in this directory C:\FeatureSelection\
    The signed jar file is called sFeatureSelection.jar
    Any help would be greatly appreciated!
    Thanks.

    One way to get at files in a jar is to put the jar in the CLASSPATH and then just refer to the resource by its path in the jar. If the same path occurs in two different jars, then you only get the first one, based on the order of the jars in CLASSPATH, I think.
    The classloader is involved, which can be confusing, but an easy way to try this is:
    String s = "myfile.txt";
    URL u = this.class.getClassLoader().getResource(s);
    Object o = u.getContent();Now, you only really know that something matched that path and now it is in a URL.
    I think the Object will be a stream and you have to read() it or something.
    BTW: I encourage you to examine the URL, but it is not necessary to do so.
    If you have somehitng like a GIF image, then here is an example of how to work with that:
    http://www.devx.com/tips/Tip/5697
    Here is a way to get the bytes without involved the ClassLoader:
    http://www.javaworld.com/javaworld/javatips/jw-javatip49.html
    Take your pick.

  • OMS Start Time

    Hi,
    I wonder if there is a way, either on the OMS server or at the backend repository database, to find out the last time that OMS was started. When I use emctl status oms -details it does not give the timestamp at which the current OMS was started. But when you do for an agent (emctl status agent) you do get such information for the agent start time.
    OMS Status:
    >./emctl status oms -details
    Oracle Enterprise Manager Cloud Control 12c Release 2
    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
    Enter Enterprise Manager Root (SYSMAN) Password :
    Console Server Host        : omsserver.mycompany.com
    HTTP Console Port          : 7778
    HTTPS Console Port         : 4444
    HTTP Upload Port           : 4889
    HTTPS Upload Port          : 1159
    EM Instance Home           : /u01/app/oracle/product/MiddleWare/gc_inst/em/EMGC_OMS1
    OMS Log Directory Location : /u01/app/oracle/product/MiddleWare/gc_inst/em/EMGC_OMS1/sysman/log
    OMS is not configured with SLB or virtual hostname
    Agent Upload is unlocked.
    OMS Console is unlocked.
    Active CA ID: 1
    Console URL: https://omsserver.mycompany.com:4444/em
    Upload URL: https://omsserver.mycompany.com:1159/empbs/upload
    WLS Domain Information
    Domain Name      : GCDomain
    Admin Server Host: omsserver.mycompany.com
    Agent Status:
    >./emctl status agent
    Oracle Enterprise Manager Cloud Control 12c Release 2
    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
    Agent Version     : 12.1.0.2.0
    OMS Version       : 12.1.0.2.0
    Protocol Version  : 12.1.0.1.0
    Agent Home        : /u01/app/oracle/product/agent12c/agent_inst
    Agent Binaries    : /u01/app/oracle/product/agent12c/core/12.1.0.2.0
    Agent Process ID  : 11230
    Parent Process ID : 11013
    Agent URL         : https://agentserver.mycompany.com:1831/emd/main/
    Repository URL    : https://hlcnwoemp01.mycompany.com:1159/empbs/upload
    Started at        : 2013-08-31 12:45:55                                                            <===== Start time
    Started by user   : oracle
    Last Reload       : (none)
    Last successful upload                       : 2013-11-25 15:08:10
    Last attempted upload                        : 2013-11-25 15:08:10
    Total Megabytes of XML files uploaded so far : 552.38
    Number of XML files pending upload           : 0
    Size of XML files pending upload(MB)         : 0
    Available disk space on upload filesystem    : 47.17%
    Collection Status                            : Collections enabled
    Heartbeat Status                             : Ok
    Last attempted heartbeat to OMS              : 2013-11-25 15:07:46
    Last successful heartbeat to OMS             : 2013-11-25 15:07:46
    Next scheduled heartbeat to OMS              : 2013-11-25 15:08:46
    Agent is Running and Ready
    Thanks!

    Console > Setup > Manage Cloud Control > Management Services
    In the table click the name of the management service
    Oracle Management Service (Drop-Down) > Monitoring > Status History
    General section has got information about since when the OMS is up

  • Applet loading of images -- network or JAR approach faster?

    hi all,
    i'm stumped. my applet used to load images over the network. (it was actually designed by someone else.) yes, the applet used to load each image file independently over the network and incurred a network hit per image file.
    to avoid the overhead of a separate network connection for each image file, i bundled all the images into the same JAR file that contains the applet. yet, the loading time for the applet is somehow slower now. i'm totally mystified.
    i put the code for loading each image into a separate thread as well. here's the thread code:
    BEGIN CODE
    public class ImageLoaderThread extends Thread {
         private Hashtable images;
         private DesignApplet applet;
         public ImageLoaderThread(DesignApplet applet, Hashtable images, String imageFile) {
              super(imageFile);
              this.images = images;
              this.applet = applet;
         public void run() {
              try {
                   System.out.println("Starting to load image ...");
                   String imageFile = getName();
                   InputStream is = applet.getClass().getResourceAsStream(imageFile);
                   int arraySize = is.available() * 2; // CH: create extra space just in case
                   System.out.println("Image Loader Thread: " + imageFile + "bytes available: " + arraySize);
                   BufferedInputStream bis = new BufferedInputStream(is);
                   byte[] byBuf = new byte[arraySize]; // a buffer large enough for our image
                   int byteRead = bis.read(byBuf, 0, arraySize);
                   Image buttonImage = Toolkit.getDefaultToolkit().createImage(byBuf);
                   images.put(imageFile, buttonImage);
              catch(Exception e) {
                   System.out.println("Exception while loading: " + getName());
                   e.printStackTrace();
    END CODE
    imageFile is the name of an image file stored in the JAR file. it's not stored on the server anywhere, so i know the image is getting created from the JAR file. despite this, the speed of image creation seems tied to the network. in other words, when i attempt to load the applet over a slow link, it takes longer to load than over a fast link.
    any ideas what i'm doing wrong? i'm seriously stumped and could use help. my goals are to minimize loading time of the applet while minimizing network hits for the server.
    thanks!
    p.s. if you want to play w/ the applet, click on the following link and click the "Customize" button: http://www.cengraving.com/s/z/Photo-plaques/PP024.jsp

    Why are you using a thread to load each image why not just load the images in the gui thread?
    Each thread you create takes a finite time to be started and stopped. This will surely have added to the load and startup time.
    There is also blocking going on since using the Java Console I can see that each thread reports in sequence:
    "Starting to load image ..."
    And then after all threads have reported they are starting they then report in squence:
    Image Loader Thread: " + imageFile + "bytes available: " + arraySize information.
    This shows that there is at least some blocking going on with the threads.
    I don't think using separate threads to do the loading is helping at all. Just load them one after another in the same thread (the thread all your threads are being started from).
    The putting of the images into the images Hashtable will also be blocking since Hashtable is synchronized.

  • It shows sequrity dialog many times when applet start.

    I made applet application. and I singed it.
    and it is made by 7 jars.
    I singed all jar.
    but it shows sequrity dialog 7 times.
    I wanna it shows dialog only 1 time.
    * I can choose option "dont ask again" because I singed by not self sign.
      so I start this applet next time, it dont shows dialog.

    Delete the account then add it back.
    Beyond that, basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.

  • Takes long time for songs to start playing

    I have window 7. I have problems when i try to play a song it takes a long time and it displays on the screen " loading URL". Why does it take so long. I have trie itunes versions 8-10.5. The only itunes that it doesn't happen in is itunes 7. Itunes also freezes up sometimes. Thanks in advance.

    Hi,
    To troubleshooting this issue, please install Windows Performance Tools (WPT) Kit. The Windows Performance Tools (WPT) Kit contains performance analysis tools, and is designed for analysis of a wide range of performance problems including application start
    times, boot issues, deferred procedure calls and interrupt activity (DPCs and ISRs), system responsiveness issues, application resource usage, and interrupt storms.
    To get the installer, you have to install the Windows 7 SDK.
    Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
    http://www.microsoft.com/en-us/download/details.aspx?id=3138
    For shutdown tracing:
    Run command:
    xbootmgr -trace shutdown -noPrepReboot -traceFlags BASE+CSWITCH+DRIVERS+POWER -resultPath C:\TEMP
    Collect logs and post them for further troubleshooting.
    For more information please refer to following MS articles:
    Long Shutdown Time on Windows 7 Ultimate x64
    http://social.technet.microsoft.com/Forums/en/w7itproperf/thread/11a42a93-efd2-4184-9ce8-bbc1438b7ea6
    Long shutdown time on Windows 7 64 bit laptop
    http://social.technet.microsoft.com/Forums/en-US/w7itproperf/thread/4440fc6e-c81e-440c-9183-9b7e176729d2
    Lawrence
    TechNet Community Support

  • I bought a new iMac today. I'm using migration assistant to move all my software, but the time just keeps getting longer. It says connect an Ethernet cable for faster data transfer. I did, but that doesn't seem to help. Any ideas?

    I bought a new iMac today. I'm using migration assistant to move all my software, but the time just keeps getting longer. It says connect an Ethernet cable for faster data transfer. I did, but that doesn't seem to help. Any ideas?

    m1doc,
    Are you migrating from a Mac or a MS Window machine? Either way you probably should be in touch with AppleCare, you have 90 days of free AppleCare telephone support. They can usually help on issues like this. If you don't know the phone number please use http://support.apple.com/kb/HE57 to help find the number in your country.

  • If I have manually set "Start Time" and "Stop Time" for songs, and my hard drive is backed up in Time Machine, when files/songs are transferred on new hard drive, will my "Start Time" "Stop Time" options be there?

    My Macbook Pro will be going in for reimaging and my hard drive will be wiped, I want to know if all my iTunes preferences will be copied if I have backed them up on Time Machine. Specifically, if I have set certain "Start Time" and "Stop Time" for my songs, and I copy my iTunes library, will these "Start Time" and "Stop Time" options remain or will I have to manually set them one by one once again? I need a reply ASAP! Thanks so much!

    As far as I'm aware the start & stop times are stored in the library database, not the media files. If you backup/restore/transfer the whole library then the settings are included. If you create a complete copy of your iTunes folder on another drive you can connect to that copy by holding down option/alt as you start iTunes so you can check that everything is working properly before you send the Macbook away.
    tt2

  • Does anyone know how to set the starting time for an audio book?

    I am trying to restart a burn in iTunes that failed for an audiobook. I need to set the start time so it will not have to reburn the disks that were already completed. I cannot find out how to do that in version 11 if the book consists of more than one file. Anyone have an idea how to do this? Apple wants me to pay $20 for something that should be in the help menu.

    UCCX 5.0(2)SR02 is the version
    I attached a screenshot of what I am trying to use but I am not sure what to put as the value?  I tried using "now" and "null" but no success.

  • My lap top is extremly slow. It studders. It kind of sounds like there is a fan inside and it constantly stopping and starting. And, it takes a really long time for it too start up. Whats wrong with it?

    My lap top is extremly slow. It studders. It kind of sounds like there is a fan inside and it constantly stopping and starting. And, it takes a really long time for it too start up. Whats wrong with it?

    Do you have current backups?
    Those symptoms could indicate a failing Hard drive. If it dies, all your documents go with it unless you have Backups.
    I have had very good luck with physical and battery problem diagnosis at the Genius Bar. Those guys put their hands (and their ears) to these machines, all day every day, and they know immediately what all those sounds mean.
    Your appointment for an evaluation is FREE, in warranty or out.

  • How to Set A Default Start Time For New Events In Calendar?

    How to Set A Default Start Time For New Events In Calendar?

    John,
    Thanks for that suggestion - could not get it to work. However, I did manage a different approach. I finally determined the sequence of events in terms of how the various events and listeners fire (I think).
    Basically, the CalendarActivityListener fires, followed by the listener associated with the Calendar object's Create facet, followed finally by the CalendarEventListener - the final is where the TriggerEvent is available and then finally, control is passed to the popup/dialog in the Create facet. So, my approach of trying to set/get the TriggerDate in the user's HTTP session was doomed to failure because it was being get before it had been set :(
    Anyway, I ended up adding a bit of code to the CalendarEvent listener - it grabs the current BindingContext, navigates through the DCBindingContainer to derive an Iterator for the ViewObject which drives the calendar and then grabs the currently active row. I then do a few tests to make sure we're working with a "new" row because I don't want to alter start & end dates associated with an existing calendar entry and then I define the Start and End dates to be the Trigger Date.
    Works just fine. Snippet from the listener follows
    BindingContext bindingContext = BindingContext.getCurrent();+
    *if ( bindingContext != null )    {*+
    DCBindingContainer dcBindings = (DCBindingContainer) bindingContext.getCurrentBindingsEntry();+
    DCIteratorBinding iterator = dcBindings.findIteratorBinding("EventsView1Iterator");+
    Row currentRow = iterator.getCurrentRow();+
    if ( currentRow.getAttribute("StartDate") == null)+
    currentRow.setAttribute("StartDate", calendarEvent.getTriggerDate());+
    if (currentRow.getAttribute("EndDate")==null)+
    currentRow.setAttribute("EndDate", calendarEvent.getTriggerDate());+
    *}*

  • Function Module for Start time and End time

    Hi Experts,
    I need a function module for getting particular Work schedule rule start time and endtime and further details by passing personnel number and day.
    Thanks in advance.
    Sunil

    FYI - https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=5338428
    Thanks,
    SK

  • Include many jars for a complex signed applet in html file??

    hello
    I'd like to know how it's possible to put a signed applet in an html file, that needs many jar files.
    I explain myself: I know that to create a signed applet and to put it in an html file, I need to create a Jar file that contains this applet, create a private key with keytool, sign the jar and include it in my html file with the tag <applet code="....." archive="......jar".... />
    This works fine if my applet is a simple program that only uses the clases present by default in the jdk.
    In my case, I have a big project, with many packages. In one of these packages, I have my applet that uses some classes of the other packages, which use classes from imported jars, such as BouncyCastle, and others...
    There is still no problem when I run the applet from the applet viewer.
    The problem appears when I put the JAR file with all these classes in the html file: there is a problem since it doesn't know anything of these classes imported from these jars.. It's quite obvious actually.
    My question is: how do I do to make the html file aware of these classes? Is there an html tag that allows us to include many jar files? Do I have to decompress all these jars, take all the directories, add them to the directories of my project and create a BIG jar (that's what I did, but it's really dirty, and heavy! (11M))??
    Does anyone have an idea about how I can do it?
    Thanks for your help
    Philippe

    11 MB is pretty big for an applet.
    Let's say your applet uses java 3d, normally a client would download and
    install this seporately, meaning the jars needed end up in lib/ext directory where
    any applet can find them.
    Check what applets need to be installed (put in lib/ext) and what can be
    downloaded:
    <object .....
    <param name="archive" value="myJar.jar, myOtherjar.jar" />

  • Delaying start time for Nokia 925 Aps?

    Is  it possible,  delaying start time for Nokia 925 Aps? For. egzample, Night watsch (uses a lot of batteries).
    I need to be visible from 5:00. Is it possible, make it automatic startup 5:00?

    hi mate, sorry to hear about your experience. in this case, the fault may lie with the Nokia Care point's handling of your device. in this case you will need to persist with them until they either fix it or issue you with a replacement. else if they are not being conducive to the matter, then you will need to take up the issue with head office of Nokia in your region.

Maybe you are looking for