Applet loading Api?

Hi,
is there a way to somehow replace original java spinning logo during applet loading with something else, and also is there a way to control the applet loading via some kind of api?
my second question is, is there an api to load one javaFX bin file into another and access its classes via API? so basically not just load as a stream of bytes but so that loader can talk to it afterward?
and all that durring runtime?
if anybody knows relative info, blog, or discussion I would appreciate if you can share it
regards
L.
Edited by: dlevancho on Apr 2, 2009 5:44 PM

This "string parameter" is doing exactly what you ask for: "+replace original java spinning logo during applet loading with something else+"...
I also remember a blog article telling how to use a small applet to show a complex load screen, then to be substituted with the larger final applet, but I don't recall where I saw that.

Similar Messages

  • Applet Persistence API - without loosing data??

    I'm using the Applet Persistence API (AppletContext.setStream / getStream) so store private data in the jvm - like session-cookies in the browser.
    Since the next-generation java-plugin this method stopped working because the java-plugin might terminate and restart the jvm during a browser session and all data is lost.
    Is it possible to prevent the java-plugin from stopping a jvm during a browsers session - for example via parameters in the applet tag?

    tronix wrote:
    ..Since the next-generation java-plugin this method stopped working ..The next-gen. plug-in allows applets to hook into the PersistenceService of the JNLP API - when they are deployed using JNLP. I have a demo. of the PersistenceService (http://pscode.org/jws/api.html#ps).
    It would be possible to create two versions of the applet. Version one is your current applet that uses the older methods for persistence. Version 2 uses the new methods.
    To decide between them on the client side, present the plug-in 2 applet in an applet element that loads the version 1 applet as the standard applet alternative to the version 2 applet.

  • Repetitive Applet Loading

    Hi,
    I have written a [signed applet|http://code.google.com/p/jzebra/] that sends special raw data to a printer. This applet loads and works well by specifying printer parameters as applet param tags.
    The applet is an open source project and has gained some momentum from a few web developers.
    Since this applet is designated for printing, it's loaded and unloaded a multitude of times (possibly hundreds) per day as the applet appears on the "print page" of the web sites that use it. (Think of a bar-code print page for example). This loading and unloading seems like a redundant step that could benefit by having the applet always running instead.
    In terms of functionality, I'm getting great feedback from users, but one complaint seems to be the load time of the applet for each successive load of the print page (our company uses the applet in a similar fashion).
    Is there a way to keep the applet "always loaded" page-wide or site-wide and have it simply "listen" for the print jobs? (Or perhaps is our web page design just wrong?)
    Suppose a pop-up or new web page loads that needs to use the applet, can the applet be residual in that fashion? It smells like a client-server relationship, but I doubt a server-side solution would work since the printers are attached locally to the workstations. I'm a fluent java developer but only know basic web development. Any help is appreciated.
    Thanks!
    -Tres

    FBL wrote:
    If this applet is deployed in a 1.6.0_10+ JREOur organization has flexibility on JRE versions, so requiring update 10 shouldn't be too large of a hurdle. In fact, the stations with internet access receive it automatically so we're lucky in that regard.
    it is possible to configure it via JWS (even while still embedded in the web page). JWS would provide more reliable caching behaviour, and might even allow you to provide the applet sandboxed, by using the JNLP API's PrintService. When you say "webstart" and "sandboxed", I assume you mean it will be a web start application that appears to be running as an applet within the page. >Just a slight clarification. To me, web start means a way of launching, sand-boxed means as opposed to j2ee-application-client-permissions or all-permissions, and embedded in a web page means as opposed to free floating (like a JFrame).
    It has been possible to launch applets using web start since Java 1.2 that become free floating. Since 1.6.0_10, it has become possible to configure an embedded applet using web start.
    All security levels are available to any application or applet launched(/configured) using web start. But a 'normal' (not configured by JNLP) signed applet has one of two security levels, either sand-boxed (the user refused the digitally signed code) or all-permissions (code OK'd).
    To use the web start services from the sand box, the code does not need to be digitally signed (one of the main benefits), but to get the code elevated to j2ee-application-client-permissions or all-permissions, it needs to be signed.
    >
    ..Although the built-in PrintService makes me wonder if you're hinting into going application-less and doing the logic in php/JavaScript. The only reason it actually shows in the page, is because it was the conservative applet approach.
    Having the applet outside the browser, or even "invisible" to the end-users is usually desired so as long as it's controlled through other means if necessary.
    Thank you for the response and the link. I launched the PrintService demo and received the security dialogs. Is that the primary purpose of the demos? >Basically. If you want to continue to deploy as trusted, then that 'query at time of print' prompt would disappear.
    >
    ...I didn't expect it to actually print anything. So, naturally I'll need to read more.
    I'm marking this thread as answered, but I'm very interested in learning more about use Java Web Start to exploit this applet. I guess I'm still a bit undereducated on the applet -- vs -- application aspect of JWS and how to bind and exploit the api through a web page.>All the services mentioned in the [JNLP API page|http://pscode.org/jws/api.html] are available to applets deployed via web start, though some of them (file associations, single instance service..) do not make much sense for applets. But the main reason I mentioned it, as that it takes control of the class caching from the browser, and makes it more reliable. Check out the [Java Web Start|http://java.sun.com/javase/technologies/desktop/javawebstart/index.jsp] pages at Sun, but keep in mind that the embedded web start applets are fairly new, and the Sun pages probably do not mention them yet (shrugs).
    It occured to me that if you are configuring the applet parameters for different products(/whatever) then you are actively generating the parameters? One slight complication is that configuring applets can be done via JS or a server side solution, whereas deployment using web start would require a unique (for each set of parameters) JNLP file that must be generated on the server side.

  • Multiple instances of the same applet loaded causes problem

    I have a java applet that has several classes in the project. The applet has a JTable a JButton and a JLabel control. The applet is displayed within an HTML page. The problem is that if a user opens the same html page more than once with the applet in it, only the last applet loaded receives the screen updates.
    For example in one senario. I have an error message that displays in the Label control once they click on the button.
    The user opens the html page and the applet is loaded (window 1). The user then opens the same html page again (window 2) with window 1 still open. If the user clicks on the Button in window 1, the error message is displayed in the window 2 applet.
    Originally I had some static variables. Thinking it was being used globally by the JVM so I removed all of them and it still happens. I have tried using both the Applet and Object tag. But it still happens.
    Has anyone experienced this before? Any suggestions on how to make the applet update the instance that recieved the events and not just the last one that was loaded?

    You need to look at applet classloader issues. If applets have the same archive list and come from the same codebase, they have the same classloader. A class is namespaced by it's class + classloader. Any statics in a class with a classloader will be shared. If you instead make it such that your applets have unique classloaders (which you can't change for unsigned applets by yourself) by changing the codebase, that would be one solution.
    For other solutions, I recommend searching the forum. This issue comes up a lot.

  • Java applet loading for a long time.

    If you go here (warning - long load to start with) -
    www.aclwebsite.co.uk
    I have placed a newsticker java applet there but when you first visit the site the browser freezes up for a while untill the applet loads.
    Any idea on whats causing this to load so much?
    Thanks.

    If you go here (warning - long load to start with) -
    www.aclwebsite.co.uk
    I have placed a newsticker java applet there but when
    you first visit the site the browser freezes up for a
    while untill the applet loads.
    Any idea on whats causing this to load so much?
    Thanks.A long-running init() or start() method of the applet. I guess you better do something about your own code then.

  • Java 1.5_13 applet loading problem due to 'activate control' fix

    I updated my JRE to Java 1.5 revision 13, and it seems to introduce a new problem. In order to fix the "click here to activate this control" problem in internet explorer, I iterate the document model and set the outerHTML of the applet tag to the same outerHTML. This removes the annoying rectangle in IE. This also causes the applet to load and break down the first time the page is displayed, because IE removes the old applet instance and creates a new one when replacing the outerHTML. When this happens on the new Java JRE release, an exception is thrown to the user saying:
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    The applet loads correctly, but the message should not be displayed. Also, it only seems to happen sometimes (maybee because sometimes the applet does not yet start before IE runs the script to replace its contents)
    Full lifecyle from the console panel:
    basic: Registered modality listener
    basic: Registered modality listener
    liveconnect: Invoking JS method: document
    liveconnect: Invoking JS method: URL
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@181fbd6, refcount=5
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@982291
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    basic: Unregistered modality listener
    basic: Stopping applet ...
    basic: Removed progress listener: sun.plugin.util.GrayBoxPainter@982291
    basic: Finding information ...
    basic: Releasing classloader: sun.plugin.ClassLoaderInfo@181fbd6, refcount=4
    basic: Done ...
    basic: Joining applet thread ...
    basic: Destroying applet ...
    basic: Disposing applet ...
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Joined applet thread ...
    basic: Unregistered modality listener
    basic: Quiting applet ...
    basic: Registered modality listener
    liveconnect: Invoking JS method: document
    liveconnect: Invoking JS method: URL
    basic: Referencing classloader: sun.plugin.ClassLoaderInfo@181fbd6, refcount=5
    basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1347dad
    basic: Loading applet ...
    basic: Initializing applet ...
    basic: Starting applet ...
    Does anyone know how to fix this new issue? Or does anyone know of a better way to solve the 'activate control' problem in IE that does not cause the reloading of this applet?
    Thanks.

    Hi!
    *1 -* Poor_Sitar_player's solution that i used.
    a - Build the applet's comented code into a div ...
    </div id='555>
    <!--
    <body>
    <applet name="EditoRTFa.class" id='editor' archive="../pages/expediente/Modelo/Editor/EditoRTFa.jar"
    code="br.gov.pa.tj.processo.expediente.casos.editor.EditoRTFa.class" width="750" height="550">
    </applet>
    <body>
    -->
    </div>
    b - After, insert a javascript the will remove the coments....
    <script type="text/javascript">
    var x = document.getElementById('555');
    var texto = x.innerHTML;
    texto = texto.replace('<!--','').replace('-->','');
    x.innerHTML = texto;
    <script type="text/javascript">
    *2 - Another solution*
    If you are using struts2 or your applet is inside a internal frame, is possible that the above solution will not work.
    So, the solution that i found was place the applet code in the main page, with width and heigh iguals "*0*" and style="float: left;" to hide the applet.
    This way, the applet will be load before you call the right page.
    That's all.
    Edited by: carlosmcp on Oct 14, 2008 7:01 AM

  • Sample SOAP request for Data Loader API

    Hi
    Can anyone please help me out in giving a sample SOAP request for Data Loader API .This is to say import 1K records from my system to the CRM instance I have .

    Log into the application and then click on Training and Support there is a WS Library of Information within the application

  • How to make an applet load user-defined package?

    How to have an applet load user-defined package?
    I have packages in their own directories, and the applet compiles and links with them, by use of CLASSPATH env variable. But when it comes time to run, it ignores that and does not know where the classes (in the packages) are.
    If I don't use packages and put all code in one directory, runs fine. If I use an application, I can link with and load my packages.
    I know applets can't use things like CLASSPATH for security reasons, but still, they should be able to be compiled out of several packages, why do I have to put all code together??

    OK, for reference for future newbies, here's the answer:
    use CODEBASE attribute in your html file (if on Windows server, don't use drive letter but relative path to .html file, Unix style, and put all your .class files beneath that, for example, in your .html file
    <applet
    CODEBASE="..\class
    and then have package bar Bar.class file, in ..\class\bar

  • What mean applet load from file system.. till now i load by browser (is

    just i heard about applet load in two way
    1) from net (this is throw html )
    2) from local file system. (What is this )
    plszz

    from local file system. (What is this )When the html file and the applet is on your harddisk and you open the html file in a browser.

  • Any good documentation of the Applet Persistence API ?

    Does anybody have links to good documentation for the Applet Persistence API? I am talking about the new getStream and setStream methods on the AppletContext class. The official documentation I have been able to find simply sucks:
    http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/persistence.html
    A search on this forum and on Google didn't reveal much either. It seems like an almost undocumented feature.
    If you have any links or if you have some hands-on experience with the Applet Persistence API, then please share it. :)

    I'm resurrecting this old thread because I think its pretty funny that in five years this seems to have only gotten more confusing. I don't think anyone is using it (ie. google was still no help) but I'm hoping someone can shed some light.
    I got the distinct impression from... something I thought I read but must have hallucinated... that this API is supposed to persist information across browser runs. Even if that's not the case, I'm curious why I can't get the stated functionality to work. I tried the only sample I could find from this page:
    http://www.java-tips.org/java-se-tips/java.applet/working-with-applet-context-streams.html
    The sample is quite good even if it leaves out the most important information about the API, which the previous poster provided (that its not 'real' persistence). Unfortunately, it doesn't seem to work with the latest release JRE. Through the debugger I'm seeing that the setStream call is happening as expected but the getStreamKeys routine always returns null. Can someone who has successfully used this enlighten me?
    Thanks,
    - David

  • Removing gray crappy ugly Applet loader background

    excuse my language but I've spent the last two days tring to figure out how to remove the gray screen when the applet loads in a browser...
    I've searched the forums, found other ppl with same problem but no real solutions...
    from what I found:
    1. using javascript to hide the applet while its loading
    works for IE but not for Netscape 6( http://www.codeproject.com/java/javaappletwaitmsg.asp )
    2. using an applet to load the real applet
    seems ok, but you still see the gray screen when the first applet loads... basically this just shortens the time you get to see the gray screen, not a proper solution( http://www.acm.vt.edu/~jmaxwell/appletloader/appletloader.html )
    So should I assume there is no way to tell the java plug-in not to make the screen gray while its loading the applet??????
    WHY? WHY? WHY?
    is there really no way of changing this horrible GRAY screen???
    please if anybody found out how to solve this, post it here!

    2 main reasons why the gray panel stays for a long time..
    1, the JVM is loaded, the applet is now visible but due to lots of late binding and other startup stuff, the Applet itself takes a long time to load.
    Solution, in a previous page, load a dummy applet that does basically nothing and make it 1x1 pixels in width and height. This cuts down on the JVM start up.
    2, Your Applet causes classes to load from the Web Server (of course).
    Solution in 2 parts:
    Part 1, make sure that all your applet classes are jar'ed with compression on and that your applet code has debug code off and no optimisation used when compiling. This ensures the smallest code size other than that produced an obfuscator.
    Part 2, Your applet should be doing 2 things. Firstly, it should be attempting to turn its background to the chosen colour as soon as possible. It should be doing nothing else at all, not even creating other classes, loading classes nothing at all. Secondly, when the Applets background colour is set, then you can start loading classes that do the work your Applet is supposed to do. When that is all over, you can that start to modify the Applet's panel

  • Applet loading in IE vs Firefox

    Hello!
    I have a peculiar problem. I have several web pages containing lots of applets which via static methods register to a "master" applet which in turn collects information from a remote source and then updates the registered applets periodically.
    Well this works fine, however the load times in IE are outrageous, it can take up to 2 minutes or so before a page with approxiamtely 20 applets is fully loaded. Whilst the same page takes about 2 seconds in firefox. I should also mention that when the page has been loaded in IE it works just as well as it does in firefox. The only problem is that it takes all to long for the page to load.
    What could be the explanation of this? What is the fundamental difference in IE compared to firefox when applets are loaded?
    Does anyone have some sort of clue about this one?
    /HG

    cell@tech wrote:
    When I navigate to the site in IE and click on the link the applet loads, but when I navigate to the site in FireFox3 it displays the html code. My FireFox browser runs applets just fine on other sites, so is there something else I need to put in the html code for FF3?Works fine with FF2.
    Try to add a BODY to your HTML.
    <html>
    <body>
    <applet height="600" width="600" code="com.program.startup.Starter.class">
    <param name=archive value=http://www.wheeling22.adventistchurchconnect.org/site/1/directory/WheelingWebSite.jar /> Your browser does not support the <code>applet</code> tag. </applet>
    </body>
    </html>Bye.
    RG.

  • Unsigned applet load failure via HTTPS

    Java Plug-in 1.5.0_06
    MSIE 6.0
    Unsigned applet loading via HTTPS failed.
    We used a relative URL in an APPLET tag :
    <APPLET CODEBASE="/TEST/" ARCHIVE="test.jar" CODE="nl.myorganisation.test">
    The plugin does not seem to reuse the browser SSL-session.
    It looks like the plugin does not find installed certificates in Explorer stores.
    The 2th and 3th connection retry use an erroneous URL.
    network: Connecting https://myorganisation.nl/TEST/test.jar with proxy=DIRECT
    security: Loading Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loaded Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loading SSL Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loaded SSL Root CA certificates from <jre-home>\lib\security\cacerts
    security: Loading Deployment SSL certificates from <user-home>\Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loaded Deployment SSL certificates from <user-home>\Data\Sun\Java\Deployment\security\trusted.jssecerts
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Loading certificates from Internet Explorer ROOT certificate store
    security: Loaded certificates from Internet Explorer ROOT certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    network: Connecting https://myorganisation.nl/CGI-BIN/nl/myorganisation/test.class with proxy=DIRECT
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    network: Connecting https://myorganisation.nl/CGI-BIN/nl/myorganisation/test.class with proxy=DIRECT
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Checking if SSL certificate is in Deployment permanent certificate store
    load: class nl.myorganisation.test not found.
    Does anybody have any suggestion ?
    Thanks and greetings,
    Marc

    First, Java plugin don't use browser https connection starting JRE 1.4, for running an applet in https server, the browser need to establish a https connection first, then Java pugin will use another https connection.
    Second, Java plugin can read certificate from browser, starting JRE 1.5, you can go to Java control panel, Advanced tab, under security, check on the box:
    "Use certificate and keys in browser keystore"
    This way the Java plugin will read the certificate from browser too. (It will work automatically in IE browser, if you use Mozilla, you have to install JSS package first).
    To answer your question, you can either turn on that option or import https certificate into JRE keystore (using Java control panel) for https connection.
    Hope that answered your question.
    Dennis

  • Applet loads full jar instead one resource

    Hi,
    i noticed that applet load full jar file instead loading one image!
    i load images with:
    InputStream in = this.getClass().getResourceAsStream(kaynakAdresi);how can i fix this?

    This will happen if the Jar is not being properly cached. Check your settings for the Plug-In and the browser; also check the headers are being sent correctly from the web server - if the expiry time etc are missing then the browser will not cache the file. Look up an HTTP sniffer if you need to trace the headers.,

  • Strange (for me) applet loading error.

    I�m developing an applet on an embedded server and I have been experienced the following error. When I load it from a 100 mbits LAN the applet loads and works well.
    But, If I try to open it through 10mBits switch, the applet refuses to work and a lot class of class not found errors appears. (The same from a location outside my LAN)
    Can it be a speed related problem?
    here is a copy of my htm (myClass is stored inside cab3.cab)
    <HTML>
    <HEAD>
    </HEAD>
    <BODY BGCOLOR="FFFF82">
    <CENTER>
    <APPLET
         codebase = "."
         archive = "cab2.cab, cab3.cab, cab4.cab, cab5.cab"
         code = "myClass.class"
         width = "760"
         height     = "420"
         >
    </APPLET>
    </CENTER>
    </BODY>
    </HTML>
    Thanks in advance.

    A Full trace might help us out:
    http://forum.java.sun.com/thread.jspa?threadID=656028

Maybe you are looking for