File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Is there any change in Class loader in JRE1.5 as compare to JRE1.3.1_01 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Is there any change in Class loader in JRE1.5 as compare to JRE1.3.1_01" Watch "Is there any change in Class loader in JRE1.5 as compare to JRE1.3.1_01" New topic
Author

Is there any change in Class loader in JRE1.5 as compare to JRE1.3.1_01

yogesh sood
Ranch Hand

Joined: Aug 31, 2000
Posts: 108
Hi,

im trying to upgrade application from JRE1.3.1_01 to JRe1.5 now we have one class which act as session and implemented as singlton it does have some static variables and some instance varible.

Its applet driven app.. so when user login first time from login applet we load the session class object into memory, and through out application we load several applet. Now in JRE 1.3.1_01 we never found any problem in accessing session object loaded from one applet to another but in JRE 1.5 although we get the reference to singleton object in other applet but access to all its member are blocked (i get null pointer exception).
Session class itself have ref to some other classes as its member variable so when accesing those member varibles it turns out to be null

No idea what to do...


If its green its biology if its stinkks its chemistry if it has numbers it is Maths and if it doesn't work its TECHNOLOGY
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41064
    
  43
The singleton approach relies on the same classloader being used for all applets. Maybe there was a change in how the plugin works between 1.3 and 1.5, and now different classloaders are used for different applets? You could check the release notes for the various plugin versions if something changed in this regard.

Are those applets on the same web page? The 1.5 plugin is supposedly better at destroying and garbage-collecting resources held by applets that are no longer on the current page.
[ January 18, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Is there any change in Class loader in JRE1.5 as compare to JRE1.3.1_01
 
Similar Threads
handling session time out
applet resize issue with jre 1.5 versions
How to lazily load references when the object is detached from session ?
Problems in applet 2 applet commnication on Java 5
Applet Loading Issue