简体   繁体   English

Eclipse:无法解析导入的Javacard

[英]Eclipse: the import javacard cannot be resolved

I'm relatively new to eclipse and I need to develop a Javacard Application. 我对Eclipse比较陌生,需要开发Javacard Application。 I got eclipse neon and JDK8 + Java card developement Kit. 我得到了Eclipse Neon和JDK8 + Java卡开发套件。 I've done all the tutorial installation untill this page (included) https://docs.oracle.com/javacard/3.0.5/guide/eclipse_java_card_plug-in.htm#JCUGC127 but when I import a project sample from the javacard directory it tells me (for example for Hello World one): 我已经完成了所有教程的安装,直到此页面(包括) https://docs.oracle.com/javacard/3.0.5/guide/eclipse_java_card_plug-in.htm#JCUGC127,但是当我从javacard目录导入项目示例时它告诉我(例如,对于Hello World):

APDU cannot be resolved to a type   
HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 65 Java Problem
Applet cannot be resolved to a type HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 29 Java Problem
ISO7816 cannot be resolved to a variable    HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 69 Java Problem
ISO7816 cannot be resolved to a variable    HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 70 Java Problem
ISO7816 cannot be resolved to a variable    HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 78 Java Problem
ISO7816 cannot be resolved to a variable    HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 80 Java Problem
The import javacard cannot be resolved  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 20 Java Problem
The import javacard cannot be resolved  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 21 Java Problem
The import javacard cannot be resolved  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 22 Java Problem
The import javacard cannot be resolved  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 23 Java Problem
The import javacard cannot be resolved  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 24 Java Problem
The method register() is undefined for the type HelloWorld  HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 38 Java Problem
Util cannot be resolved HelloWorld.java /HelloWorld/applet/src/com/sun/jcclassic/samples/helloworld line 78 Java Problem

And I got similar output with the other projects. 我在其他项目中也得到了类似的输出。 I tried some "solutions" i googled like cleaning the project,etc but no one solved the issue. 我用谷歌搜索了一些“解决方案”,例如清理项目等,但是没有人解决这个问题。 I'd appreciate some tips of what might be happening and what do I have to do. 我希望了解一些可能发生的事情以及必须采取的措施。

Thanks in advance. 提前致谢。

Add api_xxx.jar to your project "Java build path"; 将api_xxx.jar添加到您的项目“ Java构建路径”中; The library "api_xxx.jar" is located at JCKit_Dir/lib/. 库“ api_xxx.jar”位于JCKit_Dir / lib /。

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

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