Plugin categories
All (1565)
만약 내가 특정 알고리즘으로 파일을 인코딩하고, 디코딩하며 보안을 철저히 하고 싶을때..
또는 통신 알고리즘상에서 스푸핑을 방지하고 싶을때..
또는 DB 설정파일을 보안화하고 싶을때..
그냥 자바를 보면 답이 나온다.
import java.util.Iterator; public class PrintProviders { for (Iterator iter = providers[i].keySet().iterator(); iter System.out.println("-------------------------------------"); } |
자바에서는 Security 알고리즘이 무상하게 제공되고 있다.
위의 소스의 결과를 볼까?
------------------------------------- name: SUN info: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration) version: 1.6 Alg.Alias.Signature.SHA1/DSA SHA1withDSA Alg.Alias.Signature.1.2.840.10040.4.3 SHA1withDSA Alg.Alias.Signature.DSS SHA1withDSA SecureRandom.SHA1PRNG ImplementedIn Software KeyStore.JKS sun.security.provider.JavaKeyStore$JKS Alg.Alias.MessageDigest.SHA-1 SHA MessageDigest.SHA sun.security.provider.SHA KeyStore.CaseExactJKS sun.security.provider.JavaKeyStore$CaseExactJKS CertStore.com.sun.security.IndexedCollection ImplementedIn Software Alg.Alias.Signature.DSA SHA1withDSA KeyFactory.DSA ImplementedIn Software KeyStore.JKS ImplementedIn Software AlgorithmParameters.DSA ImplementedIn Software Signature.NONEwithDSA sun.security.provider.DSA$RawDSA Alg.Alias.CertificateFactory.X509 X.509 CertStore.com.sun.security.IndexedCollection sun.security.provider.certpath.IndexedCollectionCertStore Provider.id className sun.security.provider.Sun Alg.Alias.Signature.SHA-1/DSA SHA1withDSA CertificateFactory.X.509 ImplementedIn Software Signature.SHA1withDSA KeySize 1024 KeyFactory.DSA sun.security.provider.DSAKeyFactory CertPathValidator.PKIX ImplementedIn Software Configuration.JavaLoginConfig sun.security.provider.ConfigSpiFile Alg.Alias.Signature.OID.1.2.840.10040.4.3 SHA1withDSA Alg.Alias.KeyFactory.1.2.840.10040.4.1 DSA MessageDigest.MD5 ImplementedIn Software Alg.Alias.Signature.RawDSA NONEwithDSA Provider.id name SUN Alg.Alias.AlgorithmParameters.1.2.840.10040.4.1 DSA CertPathBuilder.PKIX ValidationAlgorithm RFC3280 Policy.JavaPolicy sun.security.provider.PolicySpiFile Alg.Alias.AlgorithmParameters.1.3.14.3.2.12 DSA Alg.Alias.Signature.SHA/DSA SHA1withDSA Alg.Alias.KeyPairGenerator.1.3.14.3.2.12 DSA MessageDigest.SHA-384 sun.security.provider.SHA5$SHA384 Signature.SHA1withDSA ImplementedIn Software AlgorithmParameterGenerator.DSA sun.security.provider.DSAParameterGenerator Signature.NONEwithDSA SupportedKeyClasses java.security.interfaces.DSAPublicKey|java.security.interfaces.DSAPrivateKey MessageDigest.SHA-512 sun.security.provider.SHA5$SHA512 CertPathBuilder.PKIX sun.security.provider.certpath.SunCertPathBuilder Alg.Alias.Signature.1.3.14.3.2.27 SHA1withDSA CertPathBuilder.PKIX ImplementedIn Software Provider.id version 1.6 AlgorithmParameters.DSA sun.security.provider.DSAParameters Signature.SHA1withDSA SupportedKeyClasses java.security.interfaces.DSAPublicKey|java.security.interfaces.DSAPrivateKey CertStore.Collection sun.security.provider.certpath.CollectionCertStore AlgorithmParameterGenerator.DSA ImplementedIn Software KeyPairGenerator.DSA KeySize 1024 CertStore.LDAP sun.security.provider.certpath.LDAPCertStore CertificateFactory.X.509 sun.security.provider.X509Factory CertStore.LDAP LDAPSchema RFC2587 CertStore.LDAP ImplementedIn Software KeyPairGenerator.DSA ImplementedIn Software CertPathValidator.PKIX ValidationAlgorithm RFC3280 CertStore.Collection ImplementedIn Software Alg.Alias.Signature.1.3.14.3.2.13 SHA1withDSA CertPathValidator.PKIX sun.security.provider.certpath.PKIXCertPathValidator Alg.Alias.MessageDigest.SHA1 SHA AlgorithmParameterGenerator.DSA KeySize 1024 SecureRandom.SHA1PRNG sun.security.provider.SecureRandom Signature.SHA1withDSA sun.security.provider.DSA$SHA1withDSA Alg.Alias.KeyFactory.1.3.14.3.2.12 DSA KeyPairGenerator.DSA sun.security.provider.DSAKeyPairGenerator MessageDigest.SHA ImplementedIn Software Provider.id info SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration) Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1 DSA Alg.Alias.Signature.SHAwithDSA SHA1withDSA MessageDigest.MD5 sun.security.provider.MD5 Alg.Alias.Signature.DSAWithSHA1 SHA1withDSA MessageDigest.SHA-256 sun.security.provider.SHA2 Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1 DSA MessageDigest.MD2 sun.security.provider.MD2 ------------------------------------- ------------------------------------- name: SunRsaSign info: Sun RSA signature provider version: 1.5 Alg.Alias.Signature.OID.1.2.840.113549.1.1.4 MD5withRSA Alg.Alias.Signature.OID.1.2.840.113549.1.1.2 MD2withRSA Alg.Alias.KeyFactory.1.2.840.113549.1.1 RSA Signature.SHA512withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Provider.id version 1.5 Signature.MD5withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Alg.Alias.Signature.1.2.840.113549.1.1.13 SHA512withRSA KeyPairGenerator.RSA sun.security.rsa.RSAKeyPairGenerator Alg.Alias.Signature.1.2.840.113549.1.1.12 SHA384withRSA Alg.Alias.Signature.1.2.840.113549.1.1.11 SHA256withRSA KeyFactory.RSA sun.security.rsa.RSAKeyFactory Alg.Alias.Signature.1.3.14.3.2.29 SHA1withRSA Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1 RSA Signature.MD2withRSA sun.security.rsa.RSASignature$MD2withRSA Signature.SHA384withRSA sun.security.rsa.RSASignature$SHA384withRSA Signature.MD5withRSA sun.security.rsa.RSASignature$MD5withRSA Provider.id info Sun RSA signature provider Signature.SHA1withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Signature.SHA1withRSA sun.security.rsa.RSASignature$SHA1withRSA Alg.Alias.Signature.1.2.840.113549.1.1.5 SHA1withRSA Signature.SHA256withRSA sun.security.rsa.RSASignature$SHA256withRSA Alg.Alias.Signature.1.2.840.113549.1.1.4 MD5withRSA Provider.id className sun.security.rsa.SunRsaSign Alg.Alias.Signature.OID.1.2.840.113549.1.1.13 SHA512withRSA Alg.Alias.Signature.OID.1.2.840.113549.1.1.12 SHA384withRSA Alg.Alias.Signature.1.2.840.113549.1.1.2 MD2withRSA Alg.Alias.Signature.OID.1.2.840.113549.1.1.11 SHA256withRSA Signature.MD2withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Provider.id name SunRsaSign Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1 RSA Signature.SHA384withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Signature.SHA512withRSA sun.security.rsa.RSASignature$SHA512withRSA Signature.SHA256withRSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey Alg.Alias.Signature.OID.1.2.840.113549.1.1.5 SHA1withRSA Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1 RSA ------------------------------------- ------------------------------------- name: SunJSSE info: Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) version: 1.6 Alg.Alias.Signature.OID.1.2.840.113549.1.1.4 MD5withRSA Alg.Alias.KeyFactory.1.2.840.113549.1.1 RSA Alg.Alias.Signature.OID.1.2.840.113549.1.1.2 MD2withRSA SSLContext.Default com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl Provider.id version 1.6 TrustManagerFactory.SunX509 com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$SimpleFactory KeyManagerFactory.NewSunX509 com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$X509 KeyPairGenerator.RSA sun.security.rsa.RSAKeyPairGenerator KeyStore.PKCS12 com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore SSLContext.SSLv3 com.sun.net.ssl.internal.ssl.SSLContextImpl KeyFactory.RSA sun.security.rsa.RSAKeyFactory Alg.Alias.Signature.1.3.14.3.2.29 SHA1withRSA Alg.Alias.TrustManagerFactory.X509 PKIX Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1 RSA Signature.MD5andSHA1withRSA com.sun.net.ssl.internal.ssl.RSASignature Signature.MD2withRSA sun.security.rsa.RSASignature$MD2withRSA Signature.MD5withRSA sun.security.rsa.RSASignature$MD5withRSA Provider.id info Sun JSSE provider(PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) Signature.SHA1withRSA sun.security.rsa.RSASignature$SHA1withRSA Alg.Alias.Signature.1.2.840.113549.1.1.5 SHA1withRSA Alg.Alias.Signature.1.2.840.113549.1.1.4 MD5withRSA Provider.id className com.sun.net.ssl.internal.ssl.Provider Alg.Alias.Signature.OID.1.3.14.3.2.29 SHA1withRSA Alg.Alias.Signature.1.2.840.113549.1.1.2 MD2withRSA Provider.id name SunJSSE SSLContext.SSL com.sun.net.ssl.internal.ssl.SSLContextImpl SSLContext.TLS com.sun.net.ssl.internal.ssl.SSLContextImpl TrustManagerFactory.PKIX com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$PKIXFactory SSLContext.TLSv1 com.sun.net.ssl.internal.ssl.SSLContextImpl Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1 RSA KeyManagerFactory.SunX509 com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509 Alg.Alias.TrustManagerFactory.SunPKIX PKIX Alg.Alias.TrustManagerFactory.X.509 PKIX Alg.Alias.Signature.OID.1.2.840.113549.1.1.5 SHA1withRSA Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1 RSA ------------------------------------- ------------------------------------- name: SunJCE info: SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC) version: 1.6 Cipher.Blowfish SupportedKeyFormats RAW AlgorithmParameters.DESede com.sun.crypto.provider.DESedeParameters AlgorithmParameters.DES com.sun.crypto.provider.DESParameters Cipher.DES SupportedPaddings NOPADDING|PKCS5PADDING|ISO10126PADDING AlgorithmParameters.Blowfish com.sun.crypto.provider.BlowfishParameters Cipher.DESedeWrap SupportedKeyFormats RAW Alg.Alias.KeyAgreement.1.2.840.113549.1.3.1 DiffieHellman AlgorithmParameterGenerator.DiffieHellman com.sun.crypto.provider.DHParameterGenerator Cipher.RSA SupportedPaddings NOPADDING|PKCS1PADDING|OAEPWITHMD5ANDMGF1PADDING|OAEPWITHSHA1ANDMGF1PADDING|OAEPWITHSHA-1ANDMGF1PADDING|OAEPWITHSHA-256ANDMGF1PADDING|OAEPWITHSHA-384ANDMGF1PADDING|OAEPWITHSHA-512ANDMGF1PADDING Alg.Alias.Cipher.TripleDES DESede Cipher.ARCFOUR SupportedModes ECB Mac.SslMacSHA1 SupportedKeyFormats RAW KeyGenerator.DES com.sun.crypto.provider.DESKeyGenerator Provider.id version 1.6 KeyGenerator.DESede com.sun.crypto.provider.DESedeKeyGenerator Alg.Alias.SecretKeyFactory.PBE PBEWithMD5AndDES Alg.Alias.KeyFactory.1.2.840.113549.1.3.1 DiffieHellman Mac.HmacSHA1 com.sun.crypto.provider.HmacSHA1 Cipher.PBEWithMD5AndDES com.sun.crypto.provider.PBEWithMD5AndDESCipher Cipher.AES SupportedModes ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128 Cipher.AESWrap SupportedModes ECB SecretKeyFactory.DESede com.sun.crypto.provider.DESedeKeyFactory KeyGenerator.SunTlsKeyMaterial com.sun.crypto.provider.TlsKeyMaterialGenerator AlgorithmParameters.OAEP com.sun.crypto.provider.OAEPParameters Cipher.AES SupportedKeyFormats RAW AlgorithmParameters.RC2 com.sun.crypto.provider.RC2Parameters AlgorithmParameters.PBE com.sun.crypto.provider.PBEParameters Alg.Alias.KeyPairGenerator.DH DiffieHellman Alg.Alias.KeyAgreement.OID.1.2.840.113549.1.3.1 DiffieHellman Cipher.AES com.sun.crypto.provider.AESCipher KeyGenerator.RC2 com.sun.crypto.provider.KeyGeneratorCore$RC2KeyGenerator Mac.HmacSHA512 com.sun.crypto.provider.HmacCore$HmacSHA512 Provider.id info SunJCE Provider (implements RSA, DES, Triple DES, AES, Blowfish, ARCFOUR, RC2, PBE, Diffie-Hellman, HMAC) Cipher.AES SupportedPaddings NOPADDING|PKCS5PADDING|ISO10126PADDING Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 Cipher.Blowfish SupportedPaddings NOPADDING|PKCS5PADDING|ISO10126PADDING Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede KeyStore.JCEKS com.sun.crypto.provider.JceKeyStore Cipher.Blowfish SupportedModes ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64 Alg.Alias.SecretKeyFactory.1.2.840.113549.1.5.12 PBKDF2WithHmacSHA1 Mac.HmacSHA384 SupportedKeyFormats RAW Cipher.DESedeWrap com.sun.crypto.provider.DESedeWrapCipher Cipher.ARCFOUR SupportedPaddings NOPADDING Alg.Alias.KeyPairGenerator.1.2.840.113549.1.3.1 DiffieHellman Cipher.PBEWithMD5AndTripleDES com.sun.crypto.provider.PBEWithMD5AndTripleDESCipher Alg.Alias.Cipher.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 Alg.Alias.Cipher.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede Mac.HmacSHA256 SupportedKeyFormats RAW Alg.Alias.AlgorithmParameterGenerator.1.2.840.113549.1.3.1 DiffieHellman Cipher.PBEWithSHA1AndDESede com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede SecretKeyFactory.PBEWithMD5AndDES com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndDES KeyPairGenerator.DiffieHellman com.sun.crypto.provider.DHKeyPairGenerator Cipher.RC2 SupportedModes ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64 Alg.Alias.AlgorithmParameters.Rijndael AES KeyAgreement.DiffieHellman SupportedKeyClasses javax.crypto.interfaces.DHPublicKey|javax.crypto.interfaces.DHPrivateKey Mac.HmacMD5 SupportedKeyFormats RAW KeyGenerator.SunTlsRsaPremasterSecret com.sun.crypto.provider.TlsRsaPremasterSecretGenerator Cipher.AESWrap SupportedKeyFormats RAW SecretKeyFactory.DES com.sun.crypto.provider.DESKeyFactory Cipher.AESWrap SupportedPaddings NOPADDING Provider.id name SunJCE KeyGenerator.HmacSHA512 com.sun.crypto.provider.KeyGeneratorCore$HmacSHA512KG Mac.HmacSHA256 com.sun.crypto.provider.HmacCore$HmacSHA256 Cipher.ARCFOUR SupportedKeyFormats RAW Cipher.DES SupportedModes ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64 Cipher.RSA SupportedKeyClasses java.security.interfaces.RSAPublicKey|java.security.interfaces.RSAPrivateKey SecretKeyFactory.PBEWithMD5AndTripleDES com.sun.crypto.provider.PBEKeyFactory$PBEWithMD5AndTripleDES Cipher.PBEWithSHA1AndRC2_40 com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndRC2_40 AlgorithmParameters.DiffieHellman com.sun.crypto.provider.DHParameters Mac.HmacMD5 com.sun.crypto.provider.HmacMD5 Cipher.RSA com.sun.crypto.provider.RSACipher Mac.SslMacMD5 com.sun.crypto.provider.SslMacCore$SslMacMD5 Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.5.3 PBEWithMD5AndDES Cipher.DESede SupportedPaddings NOPADDING|PKCS5PADDING|ISO10126PADDING Alg.Alias.AlgorithmParameterGenerator.OID.1.2.840.113549.1.3.1 DiffieHellman Cipher.DESede com.sun.crypto.provider.DESedeCipher Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.3.1 DiffieHellman Alg.Alias.AlgorithmParameters.1.2.840.113549.1.5.3 PBEWithMD5AndDES Mac.HmacSHA512 SupportedKeyFormats RAW Mac.HmacPBESHA1 SupportedKeyFormats RAW Alg.Alias.AlgorithmParameterGenerator.DH DiffieHellman Cipher.DESedeWrap SupportedPaddings NOPADDING Alg.Alias.SecretKeyFactory.OID.1.2.840.113549.1.5.12 PBKDF2WithHmacSHA1 Alg.Alias.AlgorithmParameters.1.2.840.113549.1.3.1 DiffieHellman Mac.HmacPBESHA1 com.sun.crypto.provider.HmacPKCS12PBESHA1 Cipher.DES SupportedKeyFormats RAW AlgorithmParameters.PBEWithMD5AndTripleDES com.sun.crypto.provider.PBEParameters Cipher.DESedeWrap SupportedModes CBC Alg.Alias.KeyFactory.OID.1.2.840.113549.1.3.1 DiffieHellman Alg.Alias.Cipher.OID.1.2.840.113549.1.5.3 PBEWithMD5AndDES AlgorithmParameters.AES com.sun.crypto.provider.AESParameters Alg.Alias.AlgorithmParameters.TripleDES DESede Alg.Alias.SecretKeyFactory.TripleDES DESede KeyGenerator.HmacSHA256 com.sun.crypto.provider.KeyGeneratorCore$HmacSHA256KG Alg.Alias.KeyGenerator.TripleDES DESede Alg.Alias.AlgorithmParameters.DH DiffieHellman KeyGenerator.AES com.sun.crypto.provider.AESKeyGenerator Cipher.RC2 SupportedPaddings NOPADDING|PKCS5PADDING|ISO10126PADDING Alg.Alias.Cipher.RC4 ARCFOUR Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.3.1 DiffieHellman Mac.HmacSHA384 com.sun.crypto.provider.HmacCore$HmacSHA384 SecretKeyFactory.PBKDF2WithHmacSHA1 com.sun.crypto.provider.PBKDF2HmacSHA1Factory Provider.id className com.sun.crypto.provider.SunJCE Cipher.DES com.sun.crypto.provider.DESCipher Cipher.Blowfish com.sun.crypto.provider.BlowfishCipher KeyGenerator.SunTlsMasterSecret com.sun.crypto.provider.TlsMasterSecretGenerator KeyGenerator.HmacSHA1 com.sun.crypto.provider.HmacSHA1KeyGenerator Alg.Alias.SecretKeyFactory.1.2.840.113549.1.5.3 PBEWithMD5AndDES KeyGenerator.SunTlsPrf com.sun.crypto.provider.TlsPrfGenerator SecretKeyFactory.PBEWithSHA1AndDESede com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndDESede KeyGenerator.ARCFOUR com.sun.crypto.provider.KeyGeneratorCore$ARCFOURKeyGenerator Alg.Alias.KeyAgreement.DH DiffieHellman Alg.Alias.KeyGenerator.Rijndael AES AlgorithmParameters.PBEWithSHA1AndDESede com.sun.crypto.provider.PBEParameters Alg.Alias.KeyGenerator.RC4 ARCFOUR Alg.Alias.Cipher.OID.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 Alg.Alias.Cipher.OID.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede Mac.SslMacMD5 SupportedKeyFormats RAW Mac.HmacSHA1 SupportedKeyFormats RAW Cipher.DESede SupportedKeyFormats RAW Cipher.RC2 com.sun.crypto.provider.RC2Cipher SecretKeyFactory.PBEWithSHA1AndRC2_40 com.sun.crypto.provider.PBEKeyFactory$PBEWithSHA1AndRC2_40 KeyGenerator.HmacMD5 com.sun.crypto.provider.HmacMD5KeyGenerator AlgorithmParameters.PBEWithSHA1AndRC2_40 com.sun.crypto.provider.PBEParameters KeyGenerator.HmacSHA384 com.sun.crypto.provider.KeyGeneratorCore$HmacSHA384KG Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 KeyFactory.DiffieHellman com.sun.crypto.provider.DHKeyFactory Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede AlgorithmParameters.PBEWithMD5AndDES com.sun.crypto.provider.PBEParameters Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede Cipher.AESWrap com.sun.crypto.provider.AESWrapCipher Alg.Alias.SecretKeyFactory.OID.1.2.840.113549.1.5.3 PBEWithMD5AndDES Alg.Alias.Cipher.Rijndael AES Cipher.RSA SupportedModes ECB Cipher.DESede SupportedModes ECB|CBC|PCBC|CTR|CTS|CFB|OFB|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64 Alg.Alias.SecretKeyFactory.OID.1.2.840.113549.1.12.1.6 PBEWithSHA1AndRC2_40 Alg.Alias.SecretKeyFactory.OID.1.2.840.113549.1.12.1.3 PBEWithSHA1AndDESede Cipher.ARCFOUR com.sun.crypto.provider.ARCFOURCipher Alg.Alias.Cipher.1.2.840.113549.1.5.3 PBEWithMD5AndDES Mac.SslMacSHA1 com.sun.crypto.provider.SslMacCore$SslMacSHA1 KeyAgreement.DiffieHellman com.sun.crypto.provider.DHKeyAgreement Cipher.RC2 SupportedKeyFormats RAW Alg.Alias.KeyFactory.DH DiffieHellman KeyGenerator.Blowfish com.sun.crypto.provider.BlowfishKeyGenerator ------------------------------------- ------------------------------------- name: SunJGSS info: Sun (Kerberos v5, SPNEGO) version: 1.0 GssApiMechanism.1.3.6.1.5.5.2 sun.security.jgss.spnego.SpNegoMechFactory Provider.id info Sun (Kerberos v5, SPNEGO) Provider.id className sun.security.jgss.SunProvider Provider.id version 1.0 GssApiMechanism.1.2.840.113554.1.2.2 sun.security.jgss.krb5.Krb5MechFactory Provider.id name SunJGSS ------------------------------------- ------------------------------------- name: SunSASL info: Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5) version: 1.5 Provider.id className com.sun.security.sasl.Provider SaslClientFactory.CRAM-MD5 com.sun.security.sasl.ClientFactoryImpl Provider.id version 1.5 SaslClientFactory.EXTERNAL com.sun.security.sasl.ClientFactoryImpl SaslClientFactory.DIGEST-MD5 com.sun.security.sasl.digest.FactoryImpl SaslClientFactory.PLAIN com.sun.security.sasl.ClientFactoryImpl Provider.id name SunSASL SaslClientFactory.GSSAPI com.sun.security.sasl.gsskerb.FactoryImpl SaslServerFactory.DIGEST-MD5 com.sun.security.sasl.digest.FactoryImpl SaslServerFactory.CRAM-MD5 com.sun.security.sasl.ServerFactoryImpl SaslServerFactory.GSSAPI com.sun.security.sasl.gsskerb.FactoryImpl Provider.id info Sun SASL provider(implements client mechanisms for: DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5; server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5) ------------------------------------- ------------------------------------- name: XMLDSig info: XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory) version: 1.0 Alg.Alias.TransformService.XPATH http://www.w3.org/TR/1999/REC-xpath-19991116 TransformService.http://www.w3.org/TR/1999/REC-xslt-19991116 MechanismType DOM Provider.id version 1.0 Alg.Alias.TransformService.INCLUSIVE http://www.w3.org/TR/2001/REC-xml-c14n-20010315 TransformService.http://www.w3.org/2000/09/xmldsig#base64 MechanismType DOM Alg.Alias.TransformService.EXCLUSIVE http://www.w3.org/2001/10/xml-exc-c14n# KeyInfoFactory.DOM org.jcp.xml.dsig.internal.dom.DOMKeyInfoFactory TransformService.http://www.w3.org/2001/10/xml-exc-c14n#WithComments org.jcp.xml.dsig.internal.dom.DOMExcC14NMethod Alg.Alias.TransformService.INCLUSIVE_WITH_COMMENTS http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments TransformService.http://www.w3.org/2002/06/xmldsig-filter2 MechanismType DOM TransformService.http://www.w3.org/TR/1999/REC-xpath-19991116 MechanismType DOM TransformService.http://www.w3.org/2001/10/xml-exc-c14n# org.jcp.xml.dsig.internal.dom.DOMExcC14NMethod XMLSignatureFactory.DOM org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory Alg.Alias.TransformService.XPATH2 http://www.w3.org/2002/06/xmldsig-filter2 TransformService.http://www.w3.org/2001/10/xml-exc-c14n# MechanismType DOM TransformService.http://www.w3.org/2001/10/xml-exc-c14n#WithComments MechanismType DOM TransformService.http://www.w3.org/TR/1999/REC-xslt-19991116 org.jcp.xml.dsig.internal.dom.DOMXSLTTransform TransformService.http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod Alg.Alias.TransformService.BASE64 http://www.w3.org/2000/09/xmldsig#base64 Alg.Alias.TransformService.ENVELOPED http://www.w3.org/2000/09/xmldsig#enveloped-signature Provider.id info XMLDSig (DOM XMLSignatureFactory; DOM KeyInfoFactory) TransformService.http://www.w3.org/TR/2001/REC-xml-c14n-20010315 org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod Provider.id className org.jcp.xml.dsig.internal.dom.XMLDSigRI Alg.Alias.TransformService.EXCLUSIVE_WITH_COMMENTS http://www.w3.org/2001/10/xml-exc-c14n#WithComments TransformService.http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments MechanismType DOM TransformService.http://www.w3.org/2002/06/xmldsig-filter2 org.jcp.xml.dsig.internal.dom.DOMXPathFilter2Transform TransformService.http://www.w3.org/2000/09/xmldsig#enveloped-signature org.jcp.xml.dsig.internal.dom.DOMEnvelopedTransform Provider.id name XMLDSig TransformService.http://www.w3.org/2000/09/xmldsig#base64 org.jcp.xml.dsig.internal.dom.DOMBase64Transform TransformService.http://www.w3.org/TR/1999/REC-xpath-19991116 org.jcp.xml.dsig.internal.dom.DOMXPathTransform TransformService.http://www.w3.org/TR/2001/REC-xml-c14n-20010315 MechanismType DOM Alg.Alias.TransformService.XSLT http://www.w3.org/TR/1999/REC-xslt-19991116 TransformService.http://www.w3.org/2000/09/xmldsig#enveloped-signature MechanismType DOM ------------------------------------- ------------------------------------- name: SunPCSC info: Sun PC/SC provider version: 1.6 Provider.id info Sun PC/SC provider Provider.id className sun.security.smartcardio.SunPCSC Provider.id version 1.6 Provider.id name SunPCSC TerminalFactory.PC/SC sun.security.smartcardio.SunPCSC$Factory ------------------------------------- ------------------------------------- name: SunMSCAPI info: Sun's Microsoft Crypto API provider version: 1.6 SecureRandom.Windows-PRNG sun.security.mscapi.PRNG Provider.id version 1.6 Cipher.RSA/ECB/PKCS1Padding sun.security.mscapi.RSACipher Signature.MD5withRSA SupportedKeyClasses sun.security.mscapi.Key KeyPairGenerator.RSA sun.security.mscapi.RSAKeyPairGenerator KeyStore.Windows-ROOT sun.security.mscapi.KeyStore$ROOT Signature.NONEwithRSA SupportedKeyClasses sun.security.mscapi.Key Cipher.RSA SupportedKeyClasses sun.security.mscapi.Key Signature.MD2withRSA sun.security.mscapi.RSASignature$MD2 Signature.MD5withRSA sun.security.mscapi.RSASignature$MD5 Cipher.RSA SupportedModes ECB Provider.id info Sun's Microsoft Crypto API provider Signature.SHA1withRSA SupportedKeyClasses sun.security.mscapi.Key Signature.SHA1withRSA sun.security.mscapi.RSASignature$SHA1 Provider.id className sun.security.mscapi.SunMSCAPI KeyPairGenerator.RSA KeySize 1024 Signature.MD2withRSA SupportedKeyClasses sun.security.mscapi.Key Provider.id name SunMSCAPI Cipher.RSA SupportedPaddings PKCS1PADDING Cipher.RSA sun.security.mscapi.RSACipher KeyStore.Windows-MY sun.security.mscapi.KeyStore$MY ------------------------------------- |
이렇게 많ㅇ이 사용될 수 있는 알고리즘 구현방식이 있다.
아래 URL의 샘플 코드를 봐보자.
http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html
import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; /** * This program generates a AES key, retrieves its raw bytes, and * then reinstantiates a AES key from the key bytes. * The reinstantiated key is used to initialize a AES cipher for * encryption and decryption. */ public class AES { /** * Turns array of bytes into string * * @param buf Array of bytes to convert to hex string * @return Generated hex string */ public static String asHex (byte buf[]) { StringBuffer strbuf = new StringBuffer(buf.length * 2); int i; for (i = 0; i < buf.length; i++) { if (((int) buf[i] & 0xff) < 0x10) strbuf.append("0"); strbuf.append(Long.toString((int) buf[i] & 0xff, 16)); } return strbuf.toString(); } public static void main(String[] args) throws Exception { String message="This is just an example"; // Get the KeyGenerator KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(128); // 192 and 256 bits may not be available // Generate the secret key specs. SecretKey skey = kgen.generateKey(); byte[] raw = skey.getEncoded(); SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); // Instantiate the cipher Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, skeySpec); byte[] encrypted = cipher.doFinal((args.length == 0 ? "This is just an example" : args[0]).getBytes()); System.out.println("encrypted string: " + asHex(encrypted)); cipher.init(Cipher.DECRYPT_MODE, skeySpec); byte[] original = cipher.doFinal(encrypted); String originalString = new String(original); System.out.println("Original string: " + originalString + " " + asHex(original)); } } [출처] 자바 Security 알고리즘 보기|작성자 용용 |
Java Error Message 정리 자료입니다.
1. ERROR Exception in thread "main" java.lang.NoClassDefFoundError: 파일명
발생되는 경우 클래스 파일을 찾을 수 없는 경우
조 언 실행하려는 클래스 파일 이름이 제대로 되어 있는지 확인한다.
또한, CLASSPATH 설정이 제대로 되어 있는지 확인하며 (도스모드에서 set명령어)
만약, 되어있지 않다면 설정한다. (CLASSPATH = jdk1.3/jre/lib/rt.jar; 2-1강좌 참조)
2. ERROR cannot resolve symbol
symbol : class in(에러가 난 부분)
location : class StackTest(찾으려는 위치)
발생되는 경우 이해할 수 없는 클래스나 메소드, 변수명이 올경우
조 언 보통 이 에러는 철자가 틀렸을 경우에 많이 발생한다. 클래스, 메소드, 변수의 철자를 세심히 확인해 본다.
특히, 철자를 확인할때 대소문자 구분을 확실히 체크한다.(자바는 대소문자를 구별한다.) 그리고 클래스에서 발생할 경우 import를 해주었는지 확인해 봅니다.
3. ERROR non-static variable 변수이름(or method 메소드이름) cannot br referenced from a static context
발생되는 경우 static 메소드 안에서 static 으로 선언되지 않은 메소드나 변수를 참조(사용)했을 경우.
특히, 메소드의 경우는 인스턴스를 사용하지 않고 static메소드 내에서 바로 선언한 경우.
조 언 static 선언자의 사용여부를 살펴보고 static 메소드 안에 static으로 선언되어지지 않은 메소드나 변수가 있느지 확인해본다.
만약 그런것이 있으면 메소드를 새로 만들어 그쪽에서 선언한다. 단, 인스턴스를 생성해서 불러줘야 한다는 것을 잊지 말아야한다.
4. ERROR valiable 변수명 might not have been initialized
발생되는 경우 지역변수인 변수명의 변수가 초기화가 되어있지 않았을 경우
조 언 지역변수(메소드 내에서 선언한 변수)를 초기화 하지 않은채 선언했을 경우 발생한다.
멤버 필드가 아닌 경우는 반드시 변수 선언시 초기화를 해주어야 한다.
(멤버 필드는 자바 프로그램 자체에서 자동으로 default값으로 초기화 해준다.)
5. ERROR class 클래스명 is public, should be declared in a file named 클래스명.java
발생되는 경우 클래스명이 public으로 선언되었는데 파일명과 다를 경우
조 언 public으로 선언된 클래스가 있다면 반드시 그 클래스명과 파일명이 같아야 한다.
클래스명과 파일명의 대소문자 및 철자가 같은지 비교해 본다.
또한, public으로 선언된 클래스가 하나 이상 있는지 찾아본다.(반드시 하나만 있어야한다.)
6. ERROR push(java.lang.object)[메소드(인자로 받을 수 있는 형)] in java.util.Stack(메소드의 클래스) cannot be applied to (int)[잘못 들어간 형]
발생되는 경우 메소드에서 인자를 받을 때 받을 수 있는 형이 아닌 자료형 또는 클래스형을 사용할 경우
조 언 사용하는 메소드의 API를 참고하여 어떤 형을 인자로 받을 수 있는지 찾아본다.
API를 보지 못할 경우는 각 자료형으로 인자를 직접 바꾸어 본다.
7. ERROR java.lang.NoSuchMethodError: main
Exception in thread "main"
발생되는 경우 클래스 파일 안에서 main() 메소드를 찾을 수 없는 경우
조 언 자바 애플릿이 아닌 이상 자바 애플리케이션은 반드시 main() 메소드를 사용해야 합니다.
main() 메소드를 빼먹지 않았는지 확인해 보십시요. 또한 public static void main(String[] args) 형식으로 씌어졌는지도 확인해 보십시요.
(main 클래스는 반드시 위와 같은 형식으로 만들어져야 합니다.)
8. ERROR unreported exception java.io.IOException(Exception명); must be caught or declared to be thrown
발생되는 경우 예외가 발생하는데 예외처리를 해주지 않았을 경우
조 언 예외를 발생하는 메소드 같은 경우는 반드시 예외처리를 해주어야 합니다.
예외를 발생하거나 예외처리를 해야하는 메소드는 API를 확인해 보시면 알 수 있습니다.
그렇지 않다면 컴파일 후 지금처럼 에러가 난 예외를 예외처리해 주시면 됩니다.
또한, 예외를 처리할 때는 메소드 차원에서 throws 예외명을 이용해서 처리할 수 있고
try{} catch{} 구문을 이용해서 직접 처리해 주셔도 됩니다.(예외 강좌를 참고하세요.)
특히, 예외도 클래스이므로 반드시 예외가 들어간 패키지를 import 해주어야 합니다.
9. ERROR Note : Calculator.java(파일명) uses or overrides a deprecated API.
Note : Recompile with -deprecation for details.
발생되는 경우 JDK 버전이 높아졌거나 보안등의 기타이유로 사용이 deprecated된 메소드를 사용한 경우
조 언 이건 예외라기 보다는 경고 입니다.(실행하면 됩니다.^^)
JDK가 버전이 높아지거나 보안등의 이유에 따라 예전에 만들어졌지만 필요가 없어지거나 대체된 메소드가 생겨났습니다.
그런 메소드를 deprecated 되었다고 하는데 이것은 API상에 나왔있습니다.
또한, 컴파일할때 -deprecation 옵션주면 어떤 메소드가 deprecate됐는지 알수있읍니다.
사용이 중지 됐다고 보기 보다는 사용을 가능하면 하지 않게끔 해주는 거죠.
대치되었거나 버전 업된 메소드를 사용하시면 됩니다.
10. ERROR MouseEvent(클래스명) should be declared abstract; it does not define mouseDragged(java.awt.event.MouseEvent)[메소드명(메소드가 포함된 클래스)] in MouseEvent(클래스명)
발생되는 경우 implements한 Interface의 모든 메소드를 구현하지 않아서 발생됨
조 언 Interface는 모든 메소드가 선언만 되고 구현되지 않은 추상(abstract) 메소드입니다.
만약 Interface를 implements하려면 implements한 클래스가 Interface에서 선언한 모든 메소드를 구현해 주어야 합니다.
하나라도 빠질 경우 implements한 클래스도 추상 클래스로 보고 에러가 발생합니다.
에러에 구현해 주어야할 메소드명이 나오므로 그곳에 쓰여있는 메소드를 구현해 주면 됩니다.
만약, 그 메소드를 구현해 주었는데 에러가 나면 철자 및 대소문자를 다시 확인해 보십시요.
11. ERROR incompatible types
found : /null(입력한 자료형)
required : int(요구하는 자료형)
발생되는 경우 입력을 했을때 맞지 않는 자료형이나 클래스형을 입력할 경우
조 언 incompatible 은 '성미가 맞지 않는','모순된' 이라는 뜻을 가진 단어 입니다.
단어뜻 처럼 입력 경우 required 에 나타난 자료형 및 클래스형을 요구하는데
found 에서 나타난 자료형 및 클래스형을 써주어서 입력을 하지 못하게 되어서 발생하는 에러입니다.
found 에 나타난 자료형을 required 에 나타난 자료형으로 변경해 주시면 됩니다.
12. ERROR package java.servlet(패키지명) does not exist
발생되는 경우 import한 패키지가 존재하지 않을 경우
조 언 import한 패키지가 존재하지 않을 경우에 발생하는 에러입니다.
철자와 대소문자를 먼저 확인하고 CLASSPATH 설정을 확인해 보시기 바랍니다.
또한 그 곳에 패키지가 jar파일로 있는지도 확인해 보셔야 합니다.
(API에 나와있는 패키지는 rt.jar에 다 있습니다.
단 javax가 붙거나 다름으로 시작되는 확장 패키지는 설치해 주어야합니다.(javax.swing 제외))
13. ERROR java.lang.NullPointerException
Exception in thread "main"(메소드) java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:341)... [에러가 일어난 부분]
발생되는 경우 참조하거나 사용한 클래스 또는 자료형이 초기화 되지 않은 경우
조 언 보통 이것은 awt나 배열 부분에서 자주 발생하는데 초기화를 해주지 않아서 많이 발생합니다.
자바의 변수들은 기본적으로(자동으로 초기화 되는 멤버필드등을 제외하고) 초기화를 요구합니다.
에러에 체크된 부분을 검토해 보시고 초기화를 해주십시요.
14. ERROR ';'(빠진 부분) expected
발생되는 경우 문법상으로 써야할 것을 쓰지 않은 경우 발생합니다.
조 언 주로 ';'을 안써주시거나 아님 '()'(괄호)를 열기만 하고 닫지 않은 실수를 할 경우 발생합니다.
대부분 이 에러가 발생한 경우는 에러에 나온것을 소스에 추가해 주시면 됩니다.
15. ERROR unexpected type
required : value(요구하는 타입)
found : class(소스상 써준 타입)
발생되는 경우 써주어야 할 타입이 아닌 잘못된 타입을 써주었을 경우
조 언 unexpected type 에러를 해석하면 '기대하지 않은 타입'이란 뜻을 가지고 있습니다.
즉, 원하는 타입(required)이 아닌데 잘못된 타입(found)을 써준 경우 발생합니다.
에러 체크된 부분의 타입을 required 에서 나타난 타입으로 변경해 주시면 됩니다.
16. ERROR java.lang.ArrayIndexOutOfBoundsException
at Test.main(Test.java:10)[클래스.메소드(파일명:에러난 위치)]
Exception in thread "main"(예외가 던져진 메소드)
발생되는 경우 배열의 범위를 넘어선 값을 넣었을 경우
조 언 위의 에러는 특이하게 컴파일은 이상없이 되지만 실행을 하면 발생하는 에러입니다.
배열의 범위를 넘어설 경우에 발생하므로 에러난 위치의 배열의 참조 범위를 확인해보시고
선언해둔 배열의 범위에 맞게 조정해 주시면 됩니다.
17. ERROR illegal start of expression
발생되는 경우 선언자(modifier)를 잘못 집어 넣은 경우
조 언 에러의 단어뜻을 확인해 보면 '표현의 시작이 부적격 합니다.'하고 해석할 수 있습니다.
보통 선언자가 맞지 않거나 쓰일데가 아닌데 선언자를 줄 경우에 많이 발생합니다.
특히 메소드안에서 static 선언자를 쓴 경우에는 직격으로 볼수 있죠.
에러가 난 부분의 선언자를 제거하거나 맞는 것인지 다시 확인해 보십시요.
18. ERROR java.io.InputStream(클래스) is abstract; cannot be instantiated
발생되는 경우 abstract로 선언된 클래스를 직접 new 명령어를 이용하여 인스턴스화 할 경우
조 언 abstract로 선언된 클래스를 직접 new 명령어를 이용하여 인스턴스화 할 경우에 발생하는 에러입니다.
왜냐하면, 추상 클래스는 직접 new 명령어를 이용하여 인스턴스화 할수 없기 때문입니다.(객체를 못만든다구요.)
이 경우에는 인스턴스를 다른 방법으로 생성하시면 됩니다.
예를 들어 인스턴스를 반환하는 메소드를 이용한다거나 상속을 통해서 상속받은 클래스의 인스턴스를 만들어
직접 인스턴스를 만드는 효과를 낼수도 있구요. 원하시는 방법으로 바꾸어 보시길...
19. ERROR local variable name(변수명) is accessed from within inner class; needs to be declared final
발생되는 경우 Local Class의 변수를 final로 선언하지 않은 경우
조 언 Local Class의 변수는 참조변수의 참조값 변동을 방지하기 위하여 final 선언자를 붙여주어야 합니다.
변수에 final 선언자를 붙이면 변수는 값을 변동할 수 없는 상수 처럼 쓰이며
만약 이 값을 참조할 경우 자바는 이 값을 넘기는게 아니라 이 값의 복사본을 참조 값으로 넘기게 됩니다.
그러므로 Local Class에서 참조값 변동없이 변수를 참조할 수 있게 되는 것입니다.
Local Class를 정의해준 곳을 살펴보고 final 선언자를 확실하게 확인하시기 바랍니다.
20. ERROR inner classes cannot have static declarations
발생되는 경우 내부 클래스 안에서 static 선언자를 쓴 경우
조 언 내부 클래스 안에서는 static 선언자를 쓸수 없습니다.
내부 클래스 안에서 사용된 static 선언자를 제거해 주십시요.
21. ERROR referenceto List is ambiguous,both class java.util.List(클래스) in java.util(패키지)
and class java.awt.List(클래스) in java.awt(패키지) match
발생되는 경우 클래스 사용시 다른 패키지내에 동일이름의 클래스들이 있어서 참조가 모호할 경우
조 언 예시를 보면 아시겠지만 import 한 패키지중에 같은 이름을 사용하는 클래스를 클래스 이름만으로
생성함으로서 참조가 모호해질 경우 발생하는 에러입니다.
이와 같은 경우는 import를 하나 제거 하거나 아님 java.util.List 이런식으로
직접 그 클래스의 패키지를 같이 써줌으로서 모호성을 제거할수 있습니다.
22. ERROR m()(메소드명) in B(클래스명) cannot override m()(메소드명) in A(클래스명);
attempting to use incompatiable return type
발생되는 경우 클래스를 상속받고서 메소드를 오버라이드 하고자할때 잘못한 경우
조 언 클래스를 상속받고서 메소드를 오버라이드 할 경우에는 지켜야 하는 규칙이 있습니다.
1. 메소드의 이름이 같아야 합니다.
2. 메소드의 파라미터 개수, 데이터형이 같아야 합니다.
3. 메소드의 리턴형이 같아야 합니다.
4. 상위 메소드와 동일하거나 더 구체적인 Exception을 발생시켜야 합니다.
5. 상위 메소드와 동일하거나 접근범위가 더 넣은 접근 제한자를 사용해야 합니다.
님의 메소드 오버라이드시 위 규칙을 잘 지켰는가를 다시 한번 확인해 보세요.
23. ERROR getPathBetweenRows(int,int)(메소드) has protected access in javax.swing.jTree(클래스)
발생되는 경우 protected로 선언된 메소드를 상속 없이 직접 불러쓸 경우
조 언 protected로 선언되어 있는 메소드는 상속하거나 같은 package에 있을 때만 쓸 수 있습니다.
상속해서 다시 public 메소드로 값을 받던지 아니면
public 메소드 중에서 비슷한 기능을 하는 메소드가 있는지 찾아서 바꾸어주어야 합니다.
24. ERROR invalid method declaration; return type required
발생되는 경우 리턴 타입을 쓰지 않아 메소드의 선언이 잘못된 경우
조 언 리턴 타입을 쓰지 않아 메소드의 선언이 잘못된 경우에 발생하는 에러이므로
에러가 발생한 메소드를 확인해보고 리턴 타입을 맞게 적어주어야 합니다.
25. ERROR Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
발생되는 경우 static으로 선언된 변수중 초기화가 안되어 있는 것이 있는 경우
조 언 static으로 선언된 변수중에 초기화가 안된게 있는 경우에 발생하는 에러이므로
에러가 발생한 변수를 확인해보고 알맞은 초기화를 시켜주거나 변수의 위치를
자동 초기화가 가능한 메소드 밖의 클래스 변수로서 사용하게 합니다.
26. ERROR Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment
발생되는 경우 중복설치 등으로 인해 레지스트리 키값이 잘못되어 있는 경우
조 언 중복설치 등으로 인해 레지스트리 키값이 잘못되어 있는 경우에 발생하는 에러이므로
레지스트리 편집기를 열어서 HKEY_LOCAL_MACHINE -> SOFTWARE -> JavaSoft에
보시면 3개의 키가 있을 겁니다. 그중에서 첫번째 키인 Java 런타임 환경 을 마우스
오른쪽 버튼으로 클릭하여 Java Runtime Environment로 이름을 바꿔주시면 됩니다.
27. ERROR Error Registry Key 'Sofrware\JavaSofrware\Java Runtime Environment\CurrentVerison'
has value '1.1',but '1.3' is requried.
Error: could not find java.dll
Error: could not find java 2 Runtime Enviroment.
발생되는 경우 중복설치 등으로 인해 레지스트리 키값의 자바 버전이 잘못되어 있는 경우
조 언 중복설치 등으로 인해 레지스트리 키값의 자바 버전이 잘못되어 있는 경우에 발생하는 에러이므로
레지스트리 편집기를 열어서 HKEY_LOCAL_MACHINE -> SOFTWARE -> JavaSoft -> Java Runtime Environment의 Current version의 값을 1.3으로 되어있는지 확인해 주시면 됩니다.
28. ERROR java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver(드라이버명)
발생되는 경우 JDBC로 데이터 베이스에 연결하는 중 드라이버를 찾지 못할 경우
조 언 JDBC를 연결하는 중에 드라이버를 찾지 못할 경우에 발생하는 에러이므로
각 데이터 베이스에 맞는 드라이버가 제대로 다운로드 되었는지 확인해 보시고
드라이버의 위치가 클래스 패스에 잡혀 있는지 확인해주시면 됩니다.
29. ERROR Method printIn(java.lang.String)(메소드명) not found in class java.io.PrintStream(클래스명)
발생되는 경우 자신이 사용한 클래스의 메소드가 맞지 않는(=없는)경우
조 언 자신이 사용한 클래스의 메소드가 맞지 않는(=없는) 경우에 발생하는 에러이므로
API를 통해서 사용하고자 하는 클래스와 메소드를 다시 한번 확인해 봅니다.
보통 이경우 메소드의 철자나 대소문자를 잘못 쓴 경우가 많으니 그점을 유심히 살표봅니다.
마지막으로 철자와 대소문자도 맞는다면 메소드의 인자의 객체형을 맞게 주었는지 확인해보면 됩니다.