User Profile

Collapse

Profile Sidebar

Collapse
Shayco
Shayco
Last Activity: Nov 9 '09, 03:19 PM
Joined: Nov 9 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • i tried this method already and it didn't work.
    notice i wrote \"C:\\My Folder\\JavaApp .bat\" which means it's supposed to be read by java as one argument.
    by the way if i have a .bat file that contains:
    "start /b notpad
    start /b calc
    start /b java -cp args..."
    and i run it like this:
    Process process = Runtime.getRunt ime().exec("\"C :\\My Folder\\JavaApp .bat\"");...
    See more | Go to post

    Leave a comment:


  • Problem with Runtime.getRuntime().exec when running java in .bat

    hey,
    in my code i'm using Runtime.getRunt ime().exec() in order to run a .bat file that calls another java program (they communicate with each other using RMI).
    when i call:
    Process process = Runtime.getRunt ime().exec("cmd /c start C:\\MyFolder\\J avaApp.bat");
    the seperate process runs perfectly, but when i add a space to the path:
    Process process = Runtime.getRunt ime().exec("cmd /c start \"C:\\My...
    See more | Go to post
No activity results to display
Show More
Working...