tags:

views:

11

answers:

1

Hi Friends, Please suggest me if we can use findbug tool without jar files as input or not!!. I am working on Android phone in which framework has been customised, so i cannot use Eclipse to build my code (I cannot use findbug plugin to compile). So i am using findbug GUI. But when we create new project, it expects jar files, java source code, Class archives. But Android does not support jar files, we usually create apk. So i am not able to provide input to findbugs. Please can anyone suggest me how to use findbugs when you have only java source code with you. Thanks in advance.

A: 

At it's basic level, FindBugs works with Java bytecode. Whether this is contained within a JAR, or as .class files in a directory structure, it doesn't really matter. However, since Android (as far as I'm aware) does not execute Java bytecode, instead it executes "Java source code compiled to Dalvik executable bytecode"[1], there will be nothing for FindBugs to analyse.

So while it is possible to use FindBugs without Jar files, it does require Java .class files, so I don't think it will work with Android APK's. However, if it's possible to compile your source with Java, there would be .class files to analyse.

[1] This is probably technically inaccurate, hopefully you get what I mean.

Grundlefleck