Java 等待Symantec End Point DoScan.exe完成文件扫描
我正在开发一个使用文件上传的应用程序。我的客户端在Windows Server上使用Symantec端点保护 所以,我使用一个示例代码来检查服务器上是否上载了一个文件 我正在使用命令行调用SEP 示例代码:Java 等待Symantec End Point DoScan.exe完成文件扫描,java,antivirus,antivirus-integration,symantec,Java,Antivirus,Antivirus Integration,Symantec,我正在开发一个使用文件上传的应用程序。我的客户端在Windows Server上使用Symantec端点保护 所以,我使用一个示例代码来检查服务器上是否上载了一个文件 我正在使用命令行调用SEP 示例代码: String[] commands = new String[6]; commands[0] = "cmd"; commands[1] = "/c"; commands[2]
String[] commands = new String[6];
commands[0] = "cmd";
commands[1] = "/c";
commands[2] = "C:\\Program Files\\Symantec\\Symantec Endpoint Protection\\DoScan.exe";
commands[3] = "/cmdlinescan";
commands[4] = "/ScanFile";
commands[5] = fileName;
Process process = Runtime.getRuntime().exec(commands);
int exitVal = process.waitFor();
我也遇到过这样的情况,SEP会为每个扫描的文件生成每日日志
scanResult = "C:\\Documents and Settings\\All Users\\Application Data\\"Symantec\\Symantec Endpoint Protection\\Logs\\";
所以,这里我想扫描文件
我已将开始读取文件的复选框放置在位置。一旦它从进程返回0
但是“int exitVal=process.waitFor();”
在SEP将日志写入文件之前返回
因此,是SEP“DoScan.exe”
内部调用线程开始扫描文件
如果是,请给我建议一个替代方案
任何帮助都将不胜感激我已经创建了一个适合我的解决方案 这里,发生了什么
int-exitVal=process.waitFor()代码>在Symantec AV将结果写入.log文件之前返回
所以,我编写了一个循环,它根据日志文件的最后修改日期不断进行检查
一旦日志文件被修改,我就会读取结果 我创建了一个适合我的解决方案
这里,发生了什么int-exitVal=process.waitFor()代码>在Symantec AV将结果写入.log文件之前返回
所以,我编写了一个循环,它根据日志文件的最后修改日期不断进行检查
一旦日志文件被修改,我就会读取结果 process.waitFor()返回一个整数1了解它的含义吗?process.waitFor()返回一个整数1了解它的含义吗?你明白了吗?这是一篇5年前的文章。这是为了演示。你明白了吗?这是一篇5年前的文章。这是为了演示。