0

I am getting the mentioned error in eclipse while importing my project. I already added jsse jar in java build path. The error code is var = SSLContext.getDefault().getSocketFactory();

I didn't find resolution on google. Thanks in Advance

Pankaj Kumar
  • 255
  • 5
  • 17

2 Answers2

2

I already added jsse jar in java build path.

The JSSE has been part of the main JRE for a while (Java 1.4 as far as I remember). Whatever version you've added to the build path is certainly an old version that conflicts with the default version: don't add that extra library, use what's already in the JSSR (no need to add security providers explicitly in general, if you're following old instructions).

Bruno
  • 119,590
  • 31
  • 270
  • 376
  • I am using java 6. Removing jsse jar from build path gives error...The import javax.net.ssl.... cannot be resolved. I am confused as by default my eclipse should use installed java 6,and if already has the jsse jar then why this error? May be i need to adjust project specific setting in java compiler or to change something in project facets... Please guide me. Thanks – Pankaj Kumar Nov 24 '13 at 10:15
  • There should be a `jsse.jar` in your "JRE System Libraries" section in your Eclipse project, but not an additional one. I'm not sure what you've done with your installation, but you could check you haven't changed the JRE structure on disk too. – Bruno Nov 24 '13 at 19:29
0

If you're using Java 6, the version which adds getDefault(), then you must be accessing a different class named SSLContext - try javax.net.ssl.SSLContext.getDefault().

Elliott Frisch
  • 198,278
  • 20
  • 158
  • 249