Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug sun.security package in eclipse

Tags:

java

security

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.]
like image 328
user3184372 Avatar asked Feb 03 '26 15:02

user3184372


1 Answers

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
like image 152
rofrol Avatar answered Feb 05 '26 04:02

rofrol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!