简体   繁体   中英

load an stk applet into a sim card

I am a beginner in developpement, i am trying to load stk applet into Sim card, this is my question :

I have an STK applet code source.

I have a smart card reader (gemplus pc/sc)

I have a SIM card and the administration code

I installed eclipse and added JAvaCard and SIM API libraries

when i try to run the applet i get this error :

    Charger : la classe ImsiManager.class est introuvable.
java.lang.ClassNotFoundException: ImsiManager.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

and a appletviewer window appear with " applet non inisialized" as a message.

please can someone help? I need to know how can I load this applet into my sim card ? all suggestions are welcome

Thank you.

You can't run SIM applets in Eclipse IDE without using a simulator and you need to use a SIM card simulator (It can be a plugin for your IDE also) or try to run your applet on a real SIM card.

Moreover, for uploading (and installing) your applets, first of all you need to convert that program to a CAP file. There is a tool in Java Card development kit named converter that you can use it to convert applets to CAP files.

Instead of using converter tool directly, you can simply use Eclipse-JCDE plugin to work with this tool and convert your applets.

After converting you need to upload this CAP file on the SIM card. You can use some already-written open source tools to aim this goal. GlobalPlatformPro is well-documented one.

Note that : I'm afraid if the Java Card Development kit is able to convert applets with proprietary SIM APIs to CAP files. but for applets that contains only Java Card API, you can use it simply.

How to convert code to cap file:

  • USE JCWDE Eclipse plugin to convert your code to CAP file. Check eclipse marketplace for plugin and its related guide. You will need JAVACARD development kit for this activity, go to Oracle website to download it or simply google it.

How to load cap file to card:

  • Visit Simalliance website, download Simalliance catloader tool. It support loading and exploring the cards. You should have related card keys to load/install or delete the applications on card.

  • Check Catloader manual on how to use the tool. ITS FREE to USE.

Enjoy :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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