javascript ANT task no longer working in Oxygen-25.0
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 65
- Joined: Fri Jan 18, 2008 5:54 pm
javascript ANT task no longer working in Oxygen-25.0
Post by Ron Van den Branden »
Hi,
When upgrading from Oxygen-24.1 (with bundled Java version Java SE 8u202) to Oxygen-25.0 (with bundled Java version OpenJDK Temurin 17.0.4.1), I'm stumbling on an ANT script in my project which invokes the Javascript task:
While this worked fine in Oxygen-24.1, Oxygen-25.0 is now throwing following error:
...with following debug pointer:
I realize this is a broader Java / ANT issue, but couldn't find much useful pointers on how to make my ANT script working again with Oxygen-25.0. I've tried including the ${oxygenHome}/lib/js.jar path explicitly in the ANT transformation's classpath, but that doesn't work.
Can anyone help me out?
Best,
Ron
When upgrading from Oxygen-24.1 (with bundled Java version Java SE 8u202) to Oxygen-25.0 (with bundled Java version OpenJDK Temurin 17.0.4.1), I'm stumbling on an ANT script in my project which invokes the Javascript task:
Code: Select all
<scriptdef name="replaceRegExp" language="javascript">
<attribute name="string"/>
<![CDATA[
// javascript code
]]>
</scriptdef>
Code: Select all
Transformation failed. Unable to create javax script engine for javascript
Code: Select all
Java 15 has removed Nashorn, you must provide an engine for running JavaScript yourself. GraalVM JavaScript currently is the preferred option.
Can anyone help me out?
Best,
Ron
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: javascript ANT task no longer working in Oxygen-25.0
Hi,
Note that this is not specific to v25.0, but to any distribution of Oxygen (even older versions) that bundles OpenJDK (11+) instead of Java 8.
Java 8 includes the Nashorn Javascript engine, but this engine was removed in Java 11+. For Oxygen's JS purposes we included Rhino (js.jar), but that doesn't seem to be enough for this particular situation.
As per the recommendation in the error message, you will most likely need the GraalVM JavaScript engine. I haven't had the chance to test this out yet.
Regards,
Adrian
Note that this is not specific to v25.0, but to any distribution of Oxygen (even older versions) that bundles OpenJDK (11+) instead of Java 8.
Java 8 includes the Nashorn Javascript engine, but this engine was removed in Java 11+. For Oxygen's JS purposes we included Rhino (js.jar), but that doesn't seem to be enough for this particular situation.
As per the recommendation in the error message, you will most likely need the GraalVM JavaScript engine. I haven't had the chance to test this out yet.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service