java 路径 批处理空格getRuntime().exec空格解决办法

    xiaoxiao2021-03-27  30

    1.java类路径空格 通过 String configPath=this.getClass().getResource("/").toString这种方式获取的路径,其中的空格会被使用“ ”代替,只要使用 String configPath=this.getClass().getResource("/").toString().replaceAll(" ", " ");就可以解决。 2、在批处理文件中如果,命令中含有空格,如下: set JAVA_JRE=D:/Program Files/tece2.1/jre set CATALINA_HOME=D:/Program Files/tece2.1/ call
    转载请注明原文地址: https://ju.6miu.com/read-664476.html

    最新回复(0)