Using winRAR with java. I'm trying to use winrar through command line.
If I run this code the window's title is "rar a compressed text.txt" (read "start"'s help file and it said that if a command is not provided, but a string is then the string will be the title of the window). I put winRAR in my PATH so I can run rar.exe from anywhere in cmd, but It's not seeing it as a command, just a string.
1
| Runtime.getRuntime().exec(new String[] {"cmd.exe", "/c", "start", "rar a compressed text.txt"}); |
also tried
1
| Runtime.getRuntime().exec(new String[] {"cmd.exe", "/c", "start", "rar", "a compressed text.txt"}); |
which will run rar.exe (blazes through the parameters) but then disappears without RARing text.txt -> compressed.rar
Any thoughts?