代码之家  ›  专栏  ›  技术社区  ›  BekaKK

如何在Intellij中运行java卡小程序?

  •  2
  • BekaKK  · 技术社区  · 9 年前

    public class HelloWorld extends Applet {
    
    protected HelloWorld() {
        register();
    }
    
    public static void install(byte[] bArray, short bOffset, byte bLength) {
        new HelloWorld();
    }
    
    /**
     * @noinspection UnusedDeclaration
     */
    public void process(APDU apdu) {
        byte[] buffer = apdu.getBuffer();
        short lc = apdu.setIncomingAndReceive();
        apdu.setOutgoingAndSend(ISO7816.OFFSET_CDATA, lc);
    }
    

    }

    enter image description here

    谢谢大家

    1 回复  |  直到 5 年前
        1
  •  2
  •   Maarten Bodewes    9 年前

    你可以下载 jCardSim