Skip to main content


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 15:12
Ralf Buschermoehle is currently offline Ralf BuschermoehleFriend
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: Thu Mar 28 09:46:11 GMT 2024

Powered by FUDForum. Page generated in 0.02302 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top