pan3793 commented on code in PR #7952:
URL: https://github.com/apache/hadoop/pull/7952#discussion_r2340730902
##########
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/pipes/TestPipeApplication.java:
##########
@@ -614,7 +618,7 @@ private File getFileCommand(String clazz) throws Exception {
if (clazz == null) {
os.write(("ls ").getBytes());
} else {
- os.write(("java -cp " + classpath + " " + clazz).getBytes());
+ os.write((System.getProperty("java.home") + "/bin/java -cp " + classpath
+ " " + clazz).getBytes());
Review Comment:
This should work.
It might be worth documenting that in Java 8,
`System.getProperty("java.home")` actually returns `$JAVA_HOME/jre`, commands
under `$JAVA_HOME/jre/bin` are a subset of `$JAVA_HOME/bin`.
--
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]