java javax.smartcardio - javadocs

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6214042/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 14:52:21  来源:igfitidea点击:

javax.smartcardio - javadocs

javasmartcard

提问by NickT

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 preferences to warn or ignore forbidden references.

我正在学习 javax.smartcardio 类。我正在使用 eclipse 3.6 并且我有 JDK 6 SE。我可以使用语句 import javax.smartcardio.* 或其任何单个类,只要我更改首选项以警告或忽略禁止的引用。

I don't see any mention of javax.smartcardio in the standard documentation at Java SE 6and no javadoc help pops up in eclipse. I have found docs here.

我在Java SE 6的标准文档中没有看到任何提及 javax.smartcardio 的内容, 并且 eclipse 中也没有弹出 javadoc 帮助。我在这里找到了文档。

Is there a way of linking Eclipse to the javadocs for smartcardio?

有没有办法将 Eclipse 链接到 smartcardio 的 javadoc?

回答by Mathe

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:

我找到了一个关于它的 WebLog(Konstantin Flitschew WebLog(德语))。它是德语的,但对我有用,所以我在这里做一个简短的翻译:

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

With this setting I was able to access the classes of javax.smartcardio.

通过此设置,我能够访问 javax.smartcardio 的类。

回答by Maarten Bodewes

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 在文档中包含 javax.smartcardio,但他们一直拒绝。现在看来 Windows 的 64 位 Java 版本 6/7 没有 javax.smartcardio,并且访问规则排除直接使用它。这很奇怪,因为 javax.smartcardio 似乎是公认的 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.

Sun 和 Oracle 在安全 API 方面并没有真正进行很好的沟通。它们的设计相对较好,但缺乏支持,而且它们确实引入了出乎意料的功能。

[EDIT]

[编辑]

Although the javax.smartcardiopackage is an accepted JSR, the umbrella JSR's for Java 6 and 7 SE don't include it. See java_se-fr-spec.zipfor more information (see below). So javacardx.smartcardioit is notpart of the Java SE standard API.Nowadays you may have trouble accessing the API even ifit is present. And you cannot add your own as it maybe present for a particular edition. You can use Eclipse access rules to enable javax.smartcardioand remove access violations from your "Problem view".

尽管该javax.smartcardio包是公认的 JSR,但 Java 6 和 7 SE 的总括 JSR 不包含它。有关更多信息,请参阅java_se-fr-spec.zip(见下文)。所以javacardx.smartcardio不是Java SE 标准 API 的一部分。现在你可能有麻烦访问甚至API ,如果它存在。您不能添加自己的,因为它可能存在于特定版本中。您可以使用 Eclipse 访问规则javax.smartcardio从“问题视图”中启用和删除访问冲突。

Java 8 from Oracle does include an javax.smartcardioimplementation. You may still have to configure access to it.

Oracle 的 Java 8 确实包含一个javax.smartcardio实现。您可能仍然需要配置对它的访问。

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 suf?ciently wide interest in the Java SE 6 time frame.

JSR 268,即 Java 智能卡 I/O API,将不包括在内,因为 JSR 270 专家组得出结论,它不会在 Java SE 6 时间范围内引起足够广泛的兴趣。

回答by Pe Wu

Oracle's JDK does not contain the javadoc for javax.smartcardioat all. Use OpenJDKinstead.

Oracle 的 JDK 根本不包含 javadoc javax.smartcardio。请改用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). The result:

https://adoptopenjdk.net/安装 OpenJDK ,然后使用Window -> Preferences -> Java -> Installed JREs(在 Windows 中,您需要的路径类似于C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot)将其添加到 Eclipse中。结果:

screenshot

截屏

回答by mapuo

I was in the same situation as you were but then I found this http://intelligenzija.net/?q=node/1Basically you need to set Access rules for these classes in the IDE so you can use them.

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