开发者社区> 问答> 正文

linux 中使用beyond compare 4 返回1 binary same 怎么解决

使用java 方法调用linux命令 bcompare -silennt .... 执行后的返回结果为1 不知道是什么原因。
java 方法:
//

public static int callShell(String[] shellString) {
try {
Process process = Runtime.getRuntime().exec(shellString);
int exitValue = process.waitFor();
System.out.println("exitValue"+exitValue);
if (0 != exitValue) {
throw new Exception("call shell failed. error code is :"

  • exitValue);
    } else {

return 0;
}
} catch (Throwable e) {
System.out.println("call shell failed. " + e);
}
return 0;
}
String[] shellString = new String[] {

            "/bin/sh"                                   
            ,"bcompare"                  
            ,"-silent"                   
            ,"@" + execJSPath            
            ,oldfilefullpath                
            ,newfilefullpath                 
            ,newfileName }; 

    int re = callShell(shellString);

程序执行后 exitValue 打印的值一直为1 不知问题出在哪里。
compare 的帮助文档给出的说明是
Return codes

Code Meaning
0 Success
1 Binary same
2 Rules-based same
11 Binary differences
12 Similar
13 Rules-based differences
14 Conflicts detected
100 Unknown error
101 Conflicts detected, merge output not written
102 BComp.exe unable to wait until BCompare.exe finishes
103 BComp.exe cannot find BCompare.exe
104 Trial period expired
105 Error loading script file
106 Script syntax error
107 Script failed to load folders or files

compare4在线的帮助文档 使用搜索功能 搜索【Command Line Reference】
http://www.scootersoftware.com/v4help/

1 Binary same 有了这个说明 可还是不知道怎么解决 请大神们有经验的指点一下!!!

展开
收起
杨冬芳 2016-07-15 17:52:37 3782 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Debian GNU/Linux 安全合规之路 立即下载
Decian GNU/Linux安全合规之路 立即下载
Linux系统通过fail2ban对暴力破解进行防护 立即下载