2

After migration from Sun's jdk (1.8) to Openjdk12 - Eclipse does not recognize the whole library of "javax.smartcardio".

for example:

import javax.smartcardio.Card; 

will cause the errors

Card cannot be resolved to a type

The import javax.smartcardio cannot be resolved

We've tried to add the "src.zip" to the JRE coniguration in the Eclipse, but its content does not appear in "Project Explorer"...

Shlomi Levy
  • 29
  • 1
  • 4
  • What's your import statement look like? You can't import a package, just a type or a wildcard for all of its types. – nitind Nov 18 '19 at 15:35
  • Unfortunately Java's Smart Card library has never been included in the source or documentation. It's a separate compile, so it is not a surprise that including `src.zip` doesn't solve your issues. Your question needs more detail on your project setup, platform etc. to be able to be solved. – Maarten Bodewes Nov 18 '19 at 16:23
  • I works with @shlomi Levy on the same project. The project is built by Maven *successfully*. – Azriel Berger Nov 18 '19 at 17:41

1 Answers1

6

Eclipse-Version (Look at the pictures.)

  1. Right click on the project -> Configure Build Path... picture
  2. Module Dependencies -> add System Module... picture
  3. add java.smartcardio (not javax.smartcardio) picture
  4. check Module -> Apply and Close picture
M Sezgin R
  • 71
  • 4