Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » finding classes (in eclipse) compiled into memory - which classloader?
finding classes (in eclipse) compiled into memory - which classloader? [message #538419] Mon, 07 June 2010 11:12
Ralf Buschermoehle is currently offline 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
Previous Topic:Importing in Execute Time
Next Topic:HyperLink, setEnabled and it's visual response
Goto Forum:
  


Current Time: Sat Aug 30 06:30:55 EDT 2014

Powered by FUDForum. Page generated in 0.01588 seconds