jcop applet upload error

落花浮王杯 提交于 2019-12-02 02:00:58

问题


I'm new to Java card development. I use jcop tools as development kit. When I run simple applet in Eclipse it gives this error. In the run configurations I choose the Java card simulation mode. After successfully installed in simulation mode i want to install app in java card.

cm>  upload -b 250 "C:\Projects\Javacard\MyTestApp\bin\hms\javacatd\Myapp\javacard\Myapp.cap"
cm>  install -i 6d796170702e617070  -q C9#() 6d797061636b616765 6d796170702e617070
jcshell: Error code: 6985 (Conditions of use not satisfied)
jcshell: Wrong response APDU: 6985
Unexpected error; aborting execution

My applet id is myapp.app and package is mypackage

Please help me to find solution.


回答1:


Is the Java-Card you are using a JCOP engineering card?

The error message "Conditions of use not satisfied" usually means that one required step is missing in the upload process, e.g. authentication.

Make sure the following steps are executed successfully before:

  1. Select Card Manager
  2. Authenticate for using the Card Manager (may depend on used card)
  3. Delete all instances of your applet before installing a new one



回答2:


What usually works for me is to not try to do this through jcshell manually, but instead upload the applet by creating a run configuration:

  • Right click on your Java Card applet project
  • Select Run As -> Run Configurations...
  • Scroll to Java Card Application, right click -> New
  • Select your card reader in Target tab
  • Set package, applet, instance AID in Package upload tab

The defaults for the other tabs are ok for me (authenticating to card manager, deleting of previous instance and package, etc.).

Save the configuration, and run it.




回答3:


Usually, if you successfully installed applet in java card simulator, but when installed on the card fails, first, you need to determine the simulator and cards used java card version is the same? That is: the card supports java card version must be consistent with the version of development kit.

Second, you need to check whether the card supporting the functions in the applet.



来源:https://stackoverflow.com/questions/17400053/jcop-applet-upload-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!