Api Javacard J2A040不支持javacardos提供的glabalplatform?

Api Javacard J2A040不支持javacardos提供的glabalplatform?,api,smartcard,javacard,globalplatform,Api,Smartcard,Javacard,Globalplatform,由于这是我第一次将globalplatform与javacardos(JCIDE)结合使用,我注意到在代码中输入以下内容时无法下载小程序: private void processGetCardStatus(APDU apdu) { byte[] buffer = apdu.getBuffer(); short le = apdu.setOutgoing(); if ( le < (byte)1 )

由于这是我第一次将globalplatform与javacardos(JCIDE)结合使用,我注意到在代码中输入以下内容时无法下载小程序:

private void processGetCardStatus(APDU apdu) { 
        byte[] buffer = apdu.getBuffer();           
        short le = apdu.setOutgoing();
        
        if ( le < (byte)1 )
           ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
        
        apdu.setOutgoingLength( (byte)1);
        buffer[0] = (byte)GPSystem.getCardState();
        
        apdu.sendBytes((short)0, (short)1);
    }
但当我对上面代码中的行进行注释时,我可以下载CAP文件:

//buffer[0] = (byte)GPSystem.getCardState();
我使用全球平台API 1.7,我的卡是J2A040,基于JCOP 2.4.1,JC 2.2.2,GP 2.1.1.,T=1,SCP02

在我的代码之上

import org.globalplatform.GPSystem;
问题出在哪里,是来自API版本吗


感谢您的回复。

问题已解决。这是因为在JCIDE Javacardos上,我需要添加jar容器,通过选择package,单击right,properties,Library选项,然后单击AddJAR容器按钮,然后选择GlobalPlatform 2.1.1,解决了这个问题。这是因为在JCIDE Javacardos上,我需要添加jar容器,通过选择package,单击right,properties,Library选项,然后单击按钮AddJAR容器,然后选择Global Platform 2.1.1,您可以发布您自己问题的答案,这样您可以在一段时间后将其标记为已接受。你不会直接从中得到任何分数,但它是1。向其他人展示问题的解决方案和2。好的,我已经发布了我的回复,但我必须等待16小时,然后我可以删除我的评论来解决问题。谢谢
import org.globalplatform.GPSystem;