Loading ...
Sorry, an error occurred while loading the content.
 

Re: Running commands in CMD box

Expand Messages
  • Eb
    John, Like Alec, I have found the dos function better than the Shell or Cmd commands. First, you ll have to hard-code the path to Java. Look it up in the
    Message 1 of 6 , Jan 24, 2012
      John,

      Like Alec, I have found the dos function better than the Shell or Cmd commands.

      First, you'll have to hard-code the path to Java. Look it up in the programs folder:

      On 64-bit machines:
      ^!Set %path%="C:\Program Files (x86)\Java\jre6\bin"
      On 32-bit OS:
      ^!Set %path%="C:\Program Files\Java\jre6\bin"

      If the paths above don't work, convert them to DosShort.

      Then use multiple dos commands in a single NoteTab function to set the path, and then call java without path (command split to several lines for clarity, recombine these lines without adding the extra spaces):

      ^!Set %returns%=
      ^$GetDosOutput(
      cmd.exe /c set path=%path%;^%path%
      &&
      java -jar d:\cb2cb\McxExtract.jar -i d:\WorkImage\CL1986.mcx
      ;")$


      Cheers,

      Eb.


      --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      > I would like to execute ...

      > java -jar d:\cb2cb\McxExtract.jar -i d:\WorkImage\CL1986.mcx
    Your message has been successfully submitted and would be delivered to recipients shortly.