Cannot initialize Polygot Sampler in `--module-path` mode
Description
- There is a problem initializing VisualVM 2.2 Polyglot Sampler with Truffle 25.0.0 when the application is running in module path mode.
- this is caused by GR-54300 changes that modified the
ENGINESfield fromMaptoSetwhich remained unnoticed for a while
Reproduce
- I've created a sample project https://github.com/jtulach/graaljs/tree/GraalJsDemo
- when executed in module path mode:
mvn -Pmodulepath package exec:execthe VisualVM Polyglot Sampler can't connect- everything works in classpath mode
- everything also works when one
--add-opensaccess for the access tofindActiveEnginesmethod...
Fix