simian在cmd命令下,怎么将检查的java冗余输出到文件中
就是,输出冗余报告
一定要用命令执行,就是java -jar D:\a\simian.jar [options][files]形式
将查找出来的信息直接输出到文件中,比如:输出到D:\report.txt中
就是,输出冗余报告
一定要用命令执行,就是java -jar D:\a\simian.jar [options][files]形式
将查找出来的信息直接输出到文件中,比如:输出到D:\report.txt中
通过 java.lang.Runtime 的 exec 方法 执行 cmd 命令.该方法返回一个 Process 对象.通过该对象的 getInputStream 获得流.然后通过该流进行写操作
比如java -classpath .\ HelloTest>d:\temp.log
不过我想知道的是在命令提示符下执行simian工具,怎么输出检查出来的冗余报告?
形式如下:
C:>java -jar simian.jar [options][files]
我用了你说的那个包,也是可以这样输出的
java -jar simian.jar TestClass>temp.logtemp.log里的内容如下:Similarity Analyser 2.2.24 - http://www.redhillconsulting.com.au/products/simian/index.html
Copyright (c) 2003-08 RedHill Consulting Pty. Ltd. All rights reserved.
Simian is not free unless used solely for non-commercial or evaluation purposes.
{failOnDuplication=true, ignoreCharacterCase=true, ignoreCurlyBraces=true, ignoreIdentifierCase=true, ignoreModifiers=true, ignoreStringCase=true, threshold=6}
Found 0 duplicate lines in 0 blocks in 0 files
Processed a total of 0 significant (0 raw) lines in 0 files
Processing time: 0.000sec不知道这是不是你想要的
C:>java -jar simian.jar [options][files]
不过我想知道的是在命令提示符下执行simian工具,怎么输出检查出来的冗余报告?
形式如下:
C:>java -jar simian.jar [options][files]
java命令本身就支持你的写法呀?还要怎么写?