I have tried to test infer using Hello.java which was located in Desktop/Hello folder in my mac. And it said "Failed to load any Java source code". (Refer below commands that I tried.).
CD-RWEERASOORI:Desktop rweerasooriya$ infer -v
Infer version v0.1.1
Copyright 2009 - present Facebook. All Rights Reserved.
CD-RWEERASOORI:Desktop rweerasooriya$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
CD-RWEERASOORI:Desktop rweerasooriya$ cd Hello/
CD-RWEERASOORI:Hello rweerasooriya$ ls
Hello.java
CD-RWEERASOORI:Hello rweerasooriya$ infer -- javac Hello.java
Fatal error: exception Failure("Failed to load any Java source code")
[ERROR] Failure during frontend, original command was
[u'inferJ', u'-g', u'-a', 'infer', u'javac', 'Hello.java']
Traceback (most recent call last):
File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferJ", line 19, in
stats = analysis.start()
File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 632, in start
if self.capture() == os.EX_OK:
File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 400, in capture
return self.run_infer_frontend()
File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 391, in run_infer_frontend
self.args.analyzer
File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 318, in run_command
raise e
subprocess.CalledProcessError: Command '[u'/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/InferJava', u'-results_dir', '/Users/rweerasooriya/Desktop/Hello/infer-out', u'-verbose_out', '/var/folders/x0/_9n0fqgj2zngnvt0642_h384zc4l_4/T/javac_hTItgR.out', u'-models', u'/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2
CD-RWEERASOORI:Hello rweerasooriya$
bug java