Instruments
Marc Petit-Huguenin
marc at petit-huguenin.org
Mon Dec 17 16:17:34 UTC 2018
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