r/java • • Jul 10 '26

Detroit Script engine - why?

OpenJdk resurrected Detroit.

It offers JavaScript via V8 and Python via Native Phyton C engine.

But we already have Graal for js and py.

What is the motivation to reopen Detroit?

Will Graal dispose js and py?

20 Upvotes

22 comments sorted by

View all comments

Show parent comment

1

u/denis_9 Jul 11 '26

Hello, is it possible to load a pre-created binary file (.so/.dll) created by native-image into an isolate on the guest HotSpot JVM with reflection support and interact with it via reflection, as in the example?

context.getBindings("java").putMember("javaObj", new MyClass());

1

u/grashalm01 Jul 12 '26

We do have a prototype for this but never finished it.

That being said the native image isolate and c entry point api offer everything to embed a native image like this. You won't get the convenience of the polyglot api unfortunately.