davidbak
davidbak

Reputation: 5999

What is the current status of Java scripting? (i.e., JSR 223 or successors)

I would like to add scripting capability to events in an existing Java application. Looking about, I find JSR 223 for Java scripting. But it is withdrawn, and wikipedia tells me that

it was decided that this functionality would be included as an integral part of Java 9 and onward.

Yet looking at the wikipedia page on Java SE versions I see nothing from Java SE 9 onward to the present time (Java SE 16, under development) that sounds like "scripting" to me.

So what is the current recommended approach to integrate a scripting facility into an existing Java program? (And did I miss something in Java SE 9+ that speaks to this?) (Or does the fact that it does show up in Java SE 8 on that wikipedia page mean that it actually got in "early" - for some definition of "early" that includes being in a late release ...)

Upvotes: 3

Views: 1405

Answers (1)

Ori Marko
Ori Marko

Reputation: 58772

I think you can ignore the withdrawn status, especially because it's already working/embedded to Java

I'm looking at your wiki link and it states that JSR 223 in on Java SE 8

JSR 223, JEP 174: Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications

and even Java 6:

Scripting Language Support (JSR 223): Generic API for tight integration with scripting languages, and built-in Mozilla JavaScript Rhino integration.

Actually there were enhancements since Java 7

Enhancements in Java SE 7 The JDK 7 release is co-bundled with the Mozilla Rhino JavaScript engine based on version 1.7R3 pre-release sources with Oracle modifications. You can download the Oracle modified Rhino sources at java.net.

Upvotes: 1

Related Questions