matthiasblaesing commented on code in PR #8264:
URL: https://github.com/apache/netbeans/pull/8264#discussion_r1997089168
##########
java/lib.jshell.agent/build.xml:
##########
@@ -55,20 +55,6 @@
</target>
<target name="jar-probe" depends="probe-init">
- <unjar src="${agentsrc.jshell.cp}" dest="build/agent/classes">
- <patternset>
- <include name="jdk/jshell/execution/**"/>
- <exclude name="**/JDI*.class"/>
- <exclude name="**/LocalExecutionControl.class"/>
- <exclude name="**/StreamingExecutionControl.class"/>
- <!--<exclude name="**/DemultiplexInput.class"/>-->
- </patternset>
- <patternset>
- <include name="jdk/jshell/spi/ExecutionControl*.class"/>
- <exclude
name="jdk/jshell/spi/ExecutionControl*Generator.class"/>
- <include name="jdk/jshell/spi/SPIResolutionException.class"/>
- </patternset>
- </unjar>
Review Comment:
This code bundles parts of the JDK into the agent `jar`. The build of
`java/lib.jshell.agent` primarily produces two artifacts:
- `nbbuild/netbeans/java/modules/ext/nb-custom-jshell-probe.jar`
- `nbbuild/netbeans/java/modules/ext/nb-mod-jshell-probe.jar`
When you compare the two files before your change, you'll notice the two
packages `jdk.jshell.execution` and `jdk.jshell.spi`. These two are only
present in the `nb-custom-jshell-probe.jar` file. After your change the two
files are identical and don't anymore for JDK8. I tested with master, there
running on JDK17 I can call a JShell for 8, with your change that fails. I did
not check further, but I assume, that JDK8 does not carry the JShell code and
with `jshell-9.jar` removed, the agent can't be started.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists