finding classes (in eclipse) compiled into memory - which classloader? [message #538419] |
Mon, 07 June 2010 15:12 |
Ralf Buschermoehle Messages: 81 Registered: July 2009 |
Member |
|
|
Hello,
I try to get
http://www.java2s.com/Code/Java/JDK-6/CompilingfromMemory.ht m
working in two eclipse projects (one is a plugin, the other not).
Unfortunately it fails to get the class from the classloader
(see code line from the CompilingfromMemory.htm) Class.forName("HelloWorld")
I would like to know which classloader I should use (that is used in):
CompilationTask task = compiler.getTask(null, null, diagnostics, null,
null, compilationUnits);
It also fails when I try to set it since Eclipse uses different
classloaders to differentiate plugins/plugin versions e.g., like
Class.forName("HelloWorld", true,
Thread.currentThread().getContextClassLoader());
So, basically it can be nailed down to the question. How can I find the
compiled class?
Any advice would be nice,
Ralf
|
|
|
Powered by
FUDForum. Page generated in 0.02302 seconds