0

I'm trying to start Lint4J (0.9.1) from the command line on a mac. And I wanted to run it on a small test class. But unfortunately I always get a null pointer exception. I have JDK 1.8.0

My test class:

package ch.ntb.sir.testmain;
public class TestMain {}

I've downloaded the lint4j package from the official website. It's not in the same folder as the test class.

This is the command I executed:

/Users/.../lib/lint4j-0.9.1/bin/lint4j -sourcepath /Users/.../ClassToCheck/src ch.ntb.sir.testmain

I execute it from the terminal in the project folder from my test class.

What I get as output:

Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException
at lint4j.aZ.a(Unknown Source)
at lint4j.aZ.a(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.a(Unknown Source)
at lint4j.aw.c(Unknown Source)
at lint4j.aw.e(Unknown Source)
at lint4j.ai.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dq.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.eO.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.by.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dP.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dI.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.ap.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at com.jutils.lint4j.Lint4j.initialize(Unknown Source)
at com.jutils.lint4j.Lint4j.execute(Unknown Source)
at com.jutils.lint4j.cmdline.Main.main(Unknown Source)
Caused by: java.lang.NullPointerException
at lint4j.q.a(Unknown Source)
... 25 more

I've found nothing that helped me on this sites:

http://www.jutils.com/uguide.html

http://www.jutils.com/auditingcode.html

and also in the lint4j.pdf was nothing helpful

All tips are welcome! Thanks for your help.

SirArt
  • 415
  • 6
  • 18

1 Answers1

1

I've learned, that Lint4J is a "dead" project. Last updated in 2007

Static Analysis tool recommendation for Java?

https://github.com/checkstyle/checkstyle/wiki/Java-static-code-analysis-tools

So it would be a bad idea to use it for a new project.

I'll try: FindBugs, Checkstyle, PMD,... their last update was in between 2015-2016

Community
  • 1
  • 1
SirArt
  • 415
  • 6
  • 18