-
Notifications
You must be signed in to change notification settings - Fork 56
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 format hook does not work on Java 1.8 #171
Comments
I'm not a bit Java expert and I'll try to document myself a bit more. |
Hi Samuele,
Java Please look at the code in the pretty_format_java.py. According to the google-java-format/README, the What needs to be done is the following.
That's it. Thanks 🙂 |
Google Formatter does not start on JDK 8. |
Thanks for the the report and carrying the check already. |
The
--add-exports
command line option was added in Java 9.When running on Java 1.8, you don't need to add these exports. Java fails to start.
Unfortunately, a lot of enterprise legacy code still uses JDK 1.8, This version is going to be supported till the end of 2030.
As a workaround I've added an alias to my
~/.bashrc
, and I rungitc
instead ofgit commit
:The text was updated successfully, but these errors were encountered: