Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:54:22+00:00 2026-06-15T18:54:22+00:00

I have an applet shown in a webpage with <applet code=foo.class></applet> When i change

  • 0

I have an applet shown in a webpage with

<applet code="foo.class"></applet>

When i change the foo.class file in the server and access the page, it shows the older version.
If I empty both browser and jvm caches, and then reload the page, it shows the current version.
How can I tell the browser/jvm that this is another version of the same class?

And, if I access the html file locally, without any webserver, it shows always the current version even without cache refresh. What am I missing?

update:

when loading the applet with js, the generated html is:

<applet code="abcSynth.class" archive="miglayout-4.0-swing.jar" height="500" width="800">
<param name="cache_option" value="no"><param name="codebase_lookup" value="false">

Now, I found in java docs that codebase_lookup it’s used when the main class is not provided with the .jar archive, just like this case. With false value, it throws ClassNotFoundException, with true value it starts (the old version).
The code folder contains main class and other few .class files, the only .jar is the miglayout.jar, but since javadocs says “Typically applets are deployed with all the needed classes and resources stored in the applet JAR files.” I wonder if I’m doing something wrong about .class/.jar depolying.

SOLVED
Thanks it worked! Browser is still holding the older version in cache but after restart it shows the current version!

Final code I used is:

<object classid="java:myClass.class" 
          type="application/x-java-applet"
          archive="myJar.jar" 
          height="500" width="800" >
<param name="code" value="myClass.class" />
<param name="persistState" value="false" />
<param name="cache_option" value="no"/>
<param name="codebase_lookup" value="true"/></object>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:54:23+00:00Added an answer on June 15, 2026 at 6:54 pm

    Interesting question…

    As a tip, you can use cache_option attribute so you can simply set not to cache you applet as…

    <html>
    <head>
    <title>Test Applet</title>
    </head>
    <body>
    Test applet...
    <script src="http://www.java.com/js/deployJava.js"></script>
    <script>
        var attributes = {code:'Test.class',
                          archive:'aTest.jar',
                          width:10, height:10};
        var parameters = {cache_option:'no'};
        var version = '1.6';
        deployJava.runApplet(attributes, parameters, version);
    </script>
    </body>
    </html>
    

    As an additional tip, try to use object tag instead of applet tag with the same parameters as:

    <PARAM name="cache_option" value="no">
    

    Report if it helped

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an applet, a jar file that is stored on the desktops and
I have an applet for uploading file, and when browse file, it showed all
I have written a gnomeapplet for gnome-panel, and the corresponding server file. Everything seems
I have a jar file which is used in html file as applet. I
I have an applet running in a browser tab. When I switch to a
I have an applet which runs in a browser. I expect that when the
I have an applet which runs in a browser and is called from Javascript.
I have an applet that is communicating with a servlet. I am communicating with
I have an applet. In this I have a JLabel component. When the user
I have an applet that throws this exception when trying to communicate with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.