How to get java getRuntime().exec() to run a command-line program with arguments?

后端 未结 4 1743
一生所求
一生所求 2020-12-14 21:34

I\'ve been trying to write a java program that uses the Runtime.getRuntime().exec() method to use the command-line to run an instance of the program \"tesseract

4条回答
  •  不知归路
    2020-12-14 22:11

    Another workaround without having to recompile and deploy is using the old DOS style paths for e.g C:\Program Files would be C:\Progra~1. Of course this will be helpful only if you are reading the paths from a config file or DB and registry etc.

提交回复
热议问题