Instruments

Martin Entlicher Martin.Entlicher at oracle.com
Mon Dec 17 16:52:00 UTC 2018


Hi Marc,

the language and instrument implementation should be on the 
truffle.class.path.append, but the "MyClass", which needs to be 
accessible from the launcher, needs to be on an ordinary class path, I 
believe.

Martin


On 17. 12. 18 17:17, Marc Petit-Huguenin wrote:
> Hi,
>
> I am trying to implement a simple Instrument.  That instrument contains an abstract class as a service that I want to use in my language launcher by using engine.getInstruments().get("myinstrument").lookup(MyClass.class), and in my language implementation using env.lookup(env.getInstruments().get("myinstrument"), MyClass.class).
>
> The path for the instrument implementation is added to the truffle.class.path.append property, as is the path for the language implementation, and I can retrieve a MyClass instance in the language implementation.  But I cannot retrieve an instance in the launcher (i.e. it returns null), probably because of a different class loader.  I tried with -XX:-UseJVMCIClassLoader, that did not help.
>
> What am I doing wrong?
>
> Thanks.
>



More information about the graal-dev mailing list