My snap always point out error about java

Regarding sen2cor see this post:

S2TBX module is the Sentinel-2 Toolbox, yes.
and please see here:

This might be a workaround. Uninstallation of S2TBX is then not necessary.