How to omit file extension from zsh autocomplete?
It appears you are still using Zsh's legacy completion system. You can upgrade to &quot;new&quot; completion system (released back in the year 2000) by adding this to your .zshrc file:
autoload -Uz compinit
compinit

Then you'll see that Zsh's java completion will no longer add .class.