Instruments
Christian Humer
christian.humer at gmail.com
Thu Dec 20 18:47:31 UTC 2018
Hi Marc,
Did you declare the service class in the @Registration annotation of the
instrument? That is necessary to allow the lookup.
- Christian Humer
Marc Petit-Huguenin <marc at petit-huguenin.org> schrieb am Mo., 17. Dez.
2018, 17:48:
> 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.
>
> --
> Marc Petit-Huguenin
> Email: marc at petit-huguenin.org
> Blog: https://marc.petit-huguenin.org
> Profile: https://www.linkedin.com/in/petithug
>
>
More information about the graal-dev
mailing list