After the scan was finished it showed me a page with 66 lines all saying unable to scan.
That is normal behaviour. Those files are encrypted or passwrod protected. Avast (and for that matter any other av) can not scan encrypted or pw protected files if it doesn't know the encryption method or pw. From your post I understand that they all are in the java folder. If they are in the java cache folder, just delete them. If they are not in the cache folder, just let them be.