3

I want to debug sun.security.rsa.RSAKeyFactorysource code with eclipse, but how ?

ProviderConfig: Loading provider: sun.security.rsa.SunRsaSign
Provider: Set SunRsaSign provider property     [KeyFactory.RSA/sun.security.rsa.RSAKeyFactory]
Provider: Set SunRsaSign provider property     [KeyPairGenerator.RSA/sun.security.rsa.RSAKeyPairGenerator]
Provider: Set SunRsaSign provider property     [Signature.MD2withRSA/sun.security.rsa.RSASignature$MD2withRSA]
Provider: Set SunRsaSign provider property     [Signature.MD5withRSA/sun.security.rsa.RSASignature$MD5withRSA]
Provider: Set SunRsaSign provider property     [Signature.SHA1withRSA/sun.security.rsa.RSASignature$SHA1withRSA]
Provider: Set SunRsaSign provider property     [Signature.SHA256withRSA/sun.security.rsa.RSASignature$SHA256withRSA]
Provider: Set SunRsaSign provider property     [Signature.SHA384withRSA/sun.security.rsa.RSASignature$SHA384withRSA]
Provider: Set SunRsaSign provider property     [Signature.SHA512withRSA/sun.security.rsa.RSASignature$SHA512withRSA]
Provider: Set SunRsaSign provider property     [Signature.MD2withRSA SupportedKeyClasses/java.security.interfaces.]
vefthym
  • 7,422
  • 6
  • 32
  • 58

1 Answers1

4

Not all sources with jdk

Some people say that sources should be included with jdk's src.zip file.

This is what I got in C:\Program Files\Java\jdk1.8.0_25\src.zip\com\sun\security

auth
jgss

So there is no provider directory nor rsa etc.

Solution

You can see the file source here.

To get it working in Eclipse using F3, download the zipped source. Rename it to

C:\Program Files\Java\jdk1.8.0_25\src.zip

Linux's jdk src.zip is also incomplete.

Eclipse settings

  • If you cannot find the declaration with F3 in Eclipse try this
  • Also if you want to open implementation declaration try this
Community
  • 1
  • 1
rofrol
  • 14,438
  • 7
  • 79
  • 77