I created first the batch file
C:\Program Files (x86)\Java\jdk1.7.0_40\bin\javac.bat with just the lines:
Code: Select all
@echo %0 %*
@echo %0 %*>"%Temp%\UltraEditToolTest.tmp"
Next I created a tool with the command line
Code: Select all
"C:\Program Files (x86)\Java\jdk1.7.0_40\bin\javac.bat" -classpath "C:\Program Files (x86)\OtherFolder\MyJarFile.jar" "%n%e"
I let the working directory empty. If a working directory is specified, it must be without double quotes even if directory path contains one or more space characters.
I selected just
DOS program and unchecked both check boxes on tab
Options of tool configuration.
And finally I selected
Output to list box,
No replace and checked just
Capture output on tab
Output of tool configuration.
As I executed the tool with a file opened in UltraEdit, everything worked as expected. I could see in output window the entire command line as passed to the batch file and also the temporary file was created containing the same command line. There was no error on running the tool several times.
So I deleted the temporary file created by the batch file, unchecked
Capture output, checked instead
Show DOS box in tool configuration, and added to batch file
@pause as third line.
But the batch file was not called anymore. I enabled additionally
Capture output and could see now the same error message as you.
I unchecked next
Capture output and
Show DOS box in tool configuration for this tool and could see that the batch file is again not called as still no file
%Temp%\UltraEditToolTest.tmp created.
Conclusion: Running a tool with a space in path which requires therefore double quotes works only if
Capture output is enabled and
Show DOS box is not enabled.
A possible workaround solution in case of
Show DOS box is needed because of user input or capturing output is not wanted is for this example the usage of the command line
Code: Select all
javac.bat -classpath "C:\Program Files (x86)\OtherFolder\MyJarFile.jar" "%f"
and using as
Working directory
Code: Select all
C:\Program Files (x86)\Java\jdk1.7.0_40\bin
Please report this issue with not working tool call for tools with file name and path in double quotes because of 1 or more spaces in path with capturing option not used or showing console window enabled to IDM support by email. I have reported this issue, too.