I am currently working on translating a batch script into powershell. I have the following line:
"C:\Temp\User\Java\jre8\bin\java.exe" -cp "class.jar" classname url Output/create-%1_!cntr!.xml db2%1.xsl > "Output\result-%1_!cntr!.xml"
I need to write this in powershell, but am struggling on the syntax. I've tried putting the whole thing after a call operator with little success. I've tried Start-Process with everything after java.exe as an argumentlist, and I've also tried Start-Job -Scriptblock.
To be explicit about what I'm trying to do, I'm trying to call my java class class.jar with several parameters and then redirect the output to "Output\result-%1_!cntr!.xml"