The close() method of ClassLoader in JDK7 is revolutionary stuff in JDK history, because ClassLoader have no function of close, module programming is very difficult to manage java object.
Therefore, there is no need to kill application to close classloader (Known for App kill).
I am very expecting JDK7 release.
URL url = new URL("file:foo.jar");
URLClassLoader loader = new URLClassLoader (new URL[] {url});
Class cl = Class.forName ("Foo", true, loader);
Runnable foo = (Runnable) cl.newInstance();
foo.run();
loader.close ();
// foo.jar gets updated somehow
loader = new URLClassLoader (new URL[] {url});
cl = Class.forName ("Foo", true, loader);
foo = (Runnable) cl.newInstance();
// run the new implementation of Foo
foo.run();
Visitor :
May 4, 2009
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(33)
-
▼
May
(29)
- Welcom The close() method of ClassLoader in JDK7
- java sources for ojdbc (odjbc14-10.0.2.zip, ojdbc1...
- Notepad with class java file (Jad Usage Tip)
- addShutdownHook() of Runtime class
- JavaFx Programming Reference
- Setting property in svn repository
- JavaOne 2008
- No SqlHandler log4j:ERROR problem
- Thinking about saving error logs in web applicatio...
- Dynamically creating table in ibatis
- checkng(or seeing) oracle jdbc driver(ojdbc.jar) v...
- Deadlock using commons-pool 1.4 and commons-dbcp 1...
- Eclipse Code Style Sample (You can import!)
- MERGE INTO Statement
- Impossible to get merged row count in ibatis. (to ...
- Clone method in Java
- Implementing equals method of collections classes
- Weakness of Java Web Start
- When you apply for developer job..
- G1 garbage collection
- [DBCP] Without given validationQuery, no validatio...
- How to get hostname in http url in Java
- How to get java cpu usage (jvm instance)
- Rounding(Scaling) x postion of decimal point
- Effective Java References
- BCEL in java6
- Good JMX References
- ConcurrentModificationException in java collection...
- How to gain Calendar type to String type in java
-
▼
May
(29)
No comments:
Post a Comment