# Alternative to Nashorn engine for Scripts?

**URL:** <https://forum.keycloak.org/t/alternative-to-nashorn-engine-for-scripts/3800>\
**Category:** Configuring the server\
**Created:** [July 15, 2020, 12:49pm UTC](https://forum.keycloak.org/t/alternative-to-nashorn-engine-for-scripts/3800 "2020-07-15T12:49:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andr0id1](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/andr0id1/32/1503_2.png) [@andr0id1](https://forum.keycloak.org/u/andr0id1)\
**Post date:** [July 15, 2020, 12:49pm UTC](https://forum.keycloak.org/t/alternative-to-nashorn-engine-for-scripts/3800/1 "2020-07-15T12:49:13Z")

</div>

Hello,  
I started to use Script Mapper to get an attribute value of every group the user joined. I followed the instructions in the documentation [https://www.keycloak.org/docs/latest/server\_development/#\_script\_providers](https://www.keycloak.org/docs/latest/server_development/#_script_providers).  
To use the script I’ve set -Dkeycloak.profile.feature.scripts=enabled

My Mapper is looking simular to this:

```
var ArrayList = Java.type("java.util.ArrayList");
var repository_claims = new ArrayList();

user.getGroups().forEach(function (groupModel) {
    var something= groupModel.getFirstAttribute("the attribute name");
    if (something&& !repository_claims.contains(something)) {
        repository_claims.add(parseInt(locId));
    }
});

exports = repository_claims;

```

Now the console is printing

> Warning: Nashorn engine is planned to be removed from a future JDK release

Do I have to change something or is there another way to do this?  
How can I make sure my scripts are not deprecated soon?

---

<div class="post-metadata">

**Author:** ![reste85](https://avatars.discourse-cdn.com/v4/letter/r/898d66/32.png) [@reste85](https://forum.keycloak.org/u/reste85)\
**Post date:** [October 20, 2020, 3:42pm UTC](https://forum.keycloak.org/t/alternative-to-nashorn-engine-for-scripts/3800/2 "2020-10-20T15:42:24Z")

</div>

Keeping it up, what’s the plan for this?  
Will javascript policies be deprecated in some way? (i hope no)

thanks!

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [October 20, 2020, 3:49pm UTC](https://forum.keycloak.org/t/alternative-to-nashorn-engine-for-scripts/3800/3 "2020-10-20T15:49:44Z")

</div>

Standalone Nashorn is coming back - as an add-on!

> **[Standalone Nashorn is coming for Java 15+](https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-October/007557.html)**
