Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java -jar /path/to/spotbugs/lib/spotbugs.jar -version returns nothing #2797

Open
esabol opened this issue Jan 6, 2024 · 3 comments
Open

Comments

@esabol
Copy link

esabol commented Jan 6, 2024

I'm a newbie trying to use SpotBugs 4.8.3 from the RHEL 8.9 command line and having a fair amount of difficulty. I had to chmod +x /path/to/spotbugs/bin/spotbugs script. Should I have to do that? I would think the script should already be executable when I untar the spotsbug-4.8.3.tgz file.

Regardless, I couldn't get the spotbugs script to work, so I switched to using java to execute the spotgsbug.jar file directly. That at least started the GUI, but I really want to use it from the command line, so I started to investigate the command line options and was surprised to discover -version doesn't return anything.

> java -jar /path/to/spotbugs/lib/spotbugs.jar -version
> 

java -jar /path/to/spotbugs/lib/spotbugs.jar -help works though. The -help output says -version should "print version, check for updates and exit, without running analysis". It doesn't.

Copy link

welcome bot commented Jan 6, 2024

Thanks for opening your first issue here! 😃
Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.

@esabol esabol changed the title java -jar /software/jira/software/fjar/spotbugs/lib/spotbugs.jar -version returns nothing java -jar /path/to/spotsbug/lib/spotbugs.jar -version returns nothing Jan 6, 2024
@esabol esabol changed the title java -jar /path/to/spotsbug/lib/spotbugs.jar -version returns nothing java -jar /path/to/spotsbugs/lib/spotbugs.jar -version returns nothing Jan 6, 2024
@esabol esabol changed the title java -jar /path/to/spotsbugs/lib/spotbugs.jar -version returns nothing java -jar /path/to/spotbugs/lib/spotbugs.jar -version returns nothing Jan 6, 2024
@xuhuisheng
Copy link

I found Version.printVersion() will print version info using info level of log. But the configed default level of log in log4j2.xml is ERROR. So version info won't print to the console.

@esabol
Copy link
Author

esabol commented Apr 24, 2024

This is still an issue with 4.8.4.

I've also tested with the "spotbugs" and "fb" scripts and with "version" and "-version". Same result. No output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants