Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Java Applet Development
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Feb 14, 2013 1:08 PM by
Strange re init of static variable in applet
Feb 14, 2013 1:08 PM
I have a shared class the manages caching of information for my applets. This class uses the singleton pattern and is initalized statically at startup of the applet.
P.S. I am using JRE version:
Java Plug-in 10.9.2.05
Using JRE version 1.7.0_09-b05 Java HotSpot(TM) Client VM
I navigate to the applet page, and get the following class loader loading my applet:
Then I navigate away to another page and come back to my applet page. The static cache is still there and the following is the classloader used:
Now i navigate away from the applet page and return a second time, and suddenly get this class loader (and the static is re initialized obviously):
The url's are the same etc.. so I am stumped as to why i 'randomly' get a different class loader and ultimately trashes my static singleton cache.
This content has been marked as final.
Show 0 replies