简体   繁体   English

javax.smartcardio - javadocs

[英]javax.smartcardio - javadocs

I'm studying the javax.smartcardio classes.我正在研究 javax.smartcardio 类。 I'm using eclipse 3.6 and I have JDK 6 SE.我正在使用 eclipse 3.6,我有 JDK 6 SE。 I can use the statement import javax.smartcardio.* or any of its individual classes, as long as I change preferences to warn or ignore forbidden references.我可以使用语句 import javax.smartcardio.* 或其任何单独的类,只要我更改首选项以警告或忽略禁止的引用。

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.我在Java SE 6的标准文档中没有看到任何提及 javax.smartcardio,并且 eclipse 中没有弹出 javadoc 帮助。 I have found docs here .我在这里找到了文档。

Is there a way of linking Eclipse to the javadocs for smartcardio?有没有办法将 Eclipse 链接到 smartcardio 的 javadocs?

I found a WebLog about it ( Konstantin Flitschew WebLog (german) ).我找到了一个关于它的 WebLog( Konstantin Flitschew WebLog (german) )。 It's in german but it worked for me, so I give a short translation here:它是德语的,但它对我有用,所以我在这里做一个简短的翻译:

  1. create a java project or open an existing project创建 java 项目或打开现有项目
  2. right-click the project and open the properties dialog右键单击项目并打开属性对话框
  3. select build path -> libraries tab and unfold the "JRE System Library" tree select 构建路径 -> 库选项卡并展开“JRE 系统库”树
  4. select the entry "Access Rules" and push the "edit" button on the right select 进入“访问规则”并按下右侧的“编辑”按钮
  5. you can apply a rule with the "add" button: set the drop down to "accessible" and enter the value “javax/smartcardio/**”您可以使用“添加”按钮应用规则:将下拉菜单设置为“可访问”并输入值“javax/smartcardio/**”

With this setting I was able to access the classes of javax.smartcardio.通过这个设置,我能够访问 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.当天我多次要求 Sun 将 javax.smartcardio 包含在文档中,但他们一直拒绝。 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.现在似乎 Windows 的 64 位 Java 版本 6/7 没有 javax.smartcardio,并且访问规则排除了直接使用它。 This is pretty strange as javax.smartcardio seems to be an accepted JSR .这很奇怪,因为 javax.smartcardio 似乎是公认的 JSR

Sun and Oracle don't really communicate well regarding security API's. Sun 和 Oracle 在安全 API 方面并没有很好地沟通。 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.尽管javax.smartcardio package 是公认的 JSR,但 Java 6 和 7 SE 的伞形 JSR 不包括它。 See java_se-fr-spec.zip for more information (see below).请参阅java_se-fr-spec.zip了解更多信息(见下文)。 So javacardx.smartcardio it is not part of the Java SE standard API.所以javacardx.smartcardio不是Java SE 标准 API 的一部分。 Nowadays you may have trouble accessing the API even if it is present.现在,即使API 存在,您也可能无法访问它。 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".您可以使用 Eclipse 访问规则来启用javax.smartcardio并从“问题视图”中删除访问冲突。

Java 8 from Oracle does include an javax.smartcardio implementation. Java 8 来自 Oracle 确实包含javax.smartcardio实现。 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. 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. Oracle 的 JDK 根本不包含javax.smartcardio的 javadoc。 Use OpenJDK instead.请改用OpenJDK

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 ). 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.我和你的情况一样,但后来我发现了这个http://intelligenzija.net/?q=node/1基本上你需要在 IDE 中为这些类设置访问规则,以便你可以使用它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM