The OO Metric tools can be downloaded from here [wpdm_package id=’738′]
- ckjm
- How to run: java -jar ckjm-1.9.jar sample.class
- Where jar file ckjm-1.9.jar is located in the build folder and the sample.class is a compiled class from sample.java
- The output sample 2 1 0 0 3 1 0 2 actually gives the metrics in this order WMC, DIT, NOC, CBO, RFC, LCOM, Ca, Ce
- If using more than one java class in your java source file, after javac compilation it would generate several .class files. Now to get the ckjm metrics for all these .class files, first you need to create a jar of them like jar cfv one.jar *.class or jar cfv Animal.class Dog.class. Then you will have to give the following command java -Djava.ext.dirs=D:\test -jar ckjm-1.9.jar *.class where the D:\test is the folder containing the one.jar file
- JMetric
- How to run: Run the jmetric.bat
- Add a java file using the + ‘New’ button
- cccc
- How to run: Run the setup file and then it would open the command prompt for cccc
- cccc hello.c and this will give reports in a .cccc folder