• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Applet question

 
Aaron Wilt
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all-
Here's the situation. I've been fiddling with some basic things in awt. I'm creating a few lines via the Line2D.Double class in the init() method and painting them in the paint() method. Everything seems to go as planned, except after i make a change (add a new line or something) compile my code, and re-open my .html page, nothing changes, it uses the old code instead of the new .class that i just compiled. This is perplexing me, because everything works fine in the appletviewer utility.
I'm doing this all offline, in other words, I'm not uploading anything to a webserver yet.
I'm using IE 6.0, I have the Java plugin selected in my advanced options.. any ideas what is happening here??
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not exactly sure if there's a better way to solve this problem, but the issue is that the browser's VM is caching that .class file. So even after you recompile it, it doesn't update it's cached version. You have to quit the browser's VM. The only way to do that (that I have discovered) is to quit out of all running instances of your browser. The last instance to close will also shut down the VM. After that, you can relaunch your HTML page and when the new VM starts up, it will load the newly compiled version of your .class file.
Like I said, this solution works, but is tedious. If there's a better way do to this I'd like to know myself.
[ April 23, 2002: Message edited by: Rob Ross ]
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aaron,
As Rob said, the problem is the browser cache. You just need to hold the control key down while you hit the refresh/reload key in your browsers. This tells the browser to ignore its' cache contents and go get the page again from the source.
Simple yet elegant,
Manfred.
 
Aaron Wilt
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much guys for your help! I couldn't seem to get the control-refresh to do anything, but at least being able to close out all the IE windows seemed to do the trick. Tedious maybe, but a working solution it is..
Again, thanks for the prompt help! Much appreciated!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic