Friday 13 February 2009

Changing runtime classPath of an Eclipse plugin programmatically??

While I was developing some functionality for a Eclipse plugin I came across the need to change the classpath at runtime so that some runtime generated class files can be accessed by the code. I found a hack after some Googling. (http://forums.sun.com/thread.jspa?threadID=300557). It worked fine when run as a standalone Java program. But when tried to port my code to the plugin it failed miserbly.
Only other thing that I could think of was using a seperate classloader to load these classes which actually worked. Seems that's the way to go to be on the safe side.

No comments: