Hello,
I've tried to fix remote debug a raspberry pi with netbeans 13 and jdk 17
which fails because the build script relies on a javascript scriptdef and
javascript engine is not available since jdk 9.
In the remote-platform-impl.xml the failing bit is :
<scriptdef name="addressport" language="javascript">
<attribute name="address" />
<attribute name="property" />
<![CDATA[
var address = attributes.get("address");
project.setProperty(attributes.get("property"),
address.split(":")[1]);
]]>
</scriptdef>
This defines the addressport property and parses for the port number from
the jpda address for feeding the ssh tunnel that connects the remote app
listening debugger to a local port :
<remotetunnel lport="${jpda.port}" lhost="localhost" rport="${jpda.port}"/>
So this basically just parses the port part from the jpda.address property.
I've tried to include a javascript engine, as suggested in this discussion (
https://www.mail-archive.com/[email protected]/msg41381.html)
with no success, probably due to lack of understanding of the process.
<classpath path="antjars/bsf.jar"/>
<classpath path="antjars/commons-logging-1.2.jar"/>
<classpath path="antjars/org.mozilla.javascript-1.7.2.jar"/>
What would be an appropriate way to fix this script long term ?
- a different approach than scripting to recover the jpda port number ?
- is there another scripting engine that is easy (no dependency) to
integrate ? After all we now have jshell
Thank you for your hindshights,
Alain