javax.smartcardio - javadocs
I'm studying the javax.smartcardio classes. I'm using eclipse 3.6 and I have JDK 6 SE. I can use the statement import javax.smartcardio.* or any of its individual classes, as long as I change 开发者_如何学Cpreferences to warn or ignore forbidden references.
I don't see any mention of javax.smartcardio in the standard documentation at Java SE 6 and no javadoc help pops up in eclipse. I have found docs here.
Is there a way of linking Eclipse to the javadocs for smartcardio?
I found a WebLog about it (Konstantin Flitschew WebLog (german)). It's in german but it worked for me, so I give a short translation here:
- create a java project or open an existing project
- right-click the project and open the properties dialog
- select build path -> libraries tab and unfold the "JRE System Library" tree
- select the entry "Access Rules" and push the "edit" button on the right
- you can apply a rule with the "add" button: set the drop down to "accessible" and enter the value “javax/smartcardio/**”
With this setting I was able to access the classes of javax.smartcardio.
I've asked Sun back in the day multiple times to include the javax.smartcardio in the documentation, but they have refused all the times. Now it seems that 64 bit Java version 6/7 for Windows do not have javax.smartcardio, and that the access rules rule out using it directly. This is pretty strange as javax.smartcardio seems to be an accepted JSR.
Sun and Oracle don't really communicate well regarding security API's. They are relatively well designed, but the support is lacking, and they do introduce features out of the blue.
[EDIT]
Although the javax.smartcardio
package is an accepted JSR, the umbrella JSR's for Java 6 and 7 SE don't include it. See java_se-fr-spec.zip for more information (see below). So javacardx.smartcardio
it is not part of the Java SE standard API. Nowadays you may have trouble accessing the API even if it is present. And you cannot add your own as it may be present for a particular edition. You can use Eclipse access rules to enable javax.smartcardio
and remove access violations from your "Problem view".
Java 8 from Oracle does include an javax.smartcardio
implementation. You may still have to configure access to it.
JSR 268, the Java Smart-Card I/O API, will not be included because the JSR 270 Expert Group concluded that it would not be of sufficiently wide interest in the Java SE 6 time frame.
Oracle's JDK does not contain the javadoc for javax.smartcardio
at all. Use OpenJDK instead.
Install OpenJDK from https://adoptopenjdk.net/, then add it in Eclipse using Window -> Preferences -> Java -> Installed JREs
(in Windows the path you need looks like C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot
). The result:
I was in the same situation as you were but then I found this http://intelligenzija.net/?q=node/1 Basically you need to set Access rules for these classes in the IDE so you can use them.
精彩评论