KeyStore.TrustedCertificateEntry
was introduced in 1.5. You must be using an earlier Java, or maybe you have your own class called KeyStore.
In any case the code is nonsense. It should be KeyStore.getInstance(KeyStore.getDefaultType())
, or a String
argument naming an explicit keystore type.