The Artima Developer Community
Sponsored Link

Java Answers Forum
How instanciate a class in the JVM ??

3 replies on 1 page. Most recent reply: Jun 30, 2003 4:26 PM by zenykx

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
guillaume

Posts: 21
Nickname: salulezami
Registered: May, 2003

How instanciate a class in the JVM ?? Posted: Jun 24, 2003 5:05 AM
Reply to this message Reply
Advertisement
I have a class with its instances in the JVM, and I load a new class. I would like to instanciate the new class with the instances of the old, and unload the old class. Is it possible ??
How could I do ??
Thanks


zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: How instanciate a class in the JVM ?? Posted: Jun 28, 2003 5:08 PM
Reply to this message Reply
You want to replace a class version with another while running an application ?

guillaume

Posts: 21
Nickname: salulezami
Registered: May, 2003

Re: How instanciate a class in the JVM ?? Posted: Jun 30, 2003 3:06 AM
Reply to this message Reply
Exactly !!
Is it possible???

zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: How instanciate a class in the JVM ?? Posted: Jun 30, 2003 4:26 PM
Reply to this message Reply
I think you can load firstly load your class with a specific ClassLoader. Afterward, you must "destroy" this ClassLoader and try to load the new version of class with another ClassLoader. You loose all the instances, but you got your new version. I dont know for sure if it really works.

You can try to check:
http://www.javaworld.com/javaworld/javaqa/2003-03/01-qa-0314-forname.html

Flat View: This topic has 3 replies on 1 page
Topic: Calling rollback on a Connection released to the pool Previous Topic   Next Topic Topic: updating vectors using Strings/Int

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use