Its your content and meta data thats what is important.
If your JS code affects you load time considerably (=slows it down) then yes, it affects your SEO a lot.
You have to do SEO audit for your website & optimize the code to pass all on-page SEO factors.
No, Java doesn't matter in SEO. Only matter is website performance, On page, Off Page and backlinks.