I'm using js functions and features in Wso2 integration studio for coding API. But I have to use Js ES6. Is it possible? If not, can I use ES6 features in Nashornjs?
Asked
Active
Viewed 67 times
0
1 Answers
0
Yes, you should be able to use ES6 features with Nashorn. Make sure you have a JDK that supports ES6 and then on server startup set the following runtime arg. You can add the following to the micro-integrator.sh
.
-Dnashorn.args=--language=es6
Also, you must use the script as an external script picked from the registry. Something like below. Otherwise, Integration Studio will not let you save ES6 syntax.
<script function="test" key="gov:scripts/script.js" language="nashornJs">
<include key="script"/>
</script>

ycr
- 12,828
- 2
- 25
- 45