How to run Java Card 2.2.1 demo application?
Hi Friends..
i want to know how to run Java Card 2.2.1 demo application in Windows environment..
Sorry, perhaps this question looks like a little bit stupid.. :(
In Windows, I've set the environment variables for :
JAVA_HOME : C:\Program Files\Java\jdk1.6.0_03
JC_HOME : C:\java_card_kit-2_2_1
and then how to run demo1.scr, etc?.
Please help me regarding this,
Thanks in advance..
Is there any suggestion for my question?.. :(
Thanks in advance..
Similar Messages
-
How to run Java Card Program in a Simulator
I m Narendra Reddy studying in India and have taken Java Card for my B.E. final year project.
i also acquire knowledge of Whole Java Card Development Life Cycle but i found much more difficulties to implement those ideas into java card.
so, Will you please do me a favour and give me a complete solution if possible with an example.
i also want each step with the commands, from the creation of Class file to the running of prog. in simulator.
it will be very useful for me to head towards my project.
Thank you,Just for the record,
Since we are looking at different possibilities, there are couple of ways to achieve simulation/testing environment for current Java Card,
1. "The Java Card Workstation Development Environment(JCWDE) tool allows the simulated running of Java Card applet as if it were masked in ROM. It immulates Card environment." Although, as Joe mentioned, it does not support;
- package installation
- applet instance creation
- persistent card state
- firewall
- transactions
- transient array clearing
- remote method invocation
- applet/package deletion
Thus you can use 'jcwde' tool in combination of apdutool to test some
of the Applet behavior(& JCRE) but not all. You have realized this when you tried 'sample' applets.
2. JCDK2.2 also provide c-reference implementation of the Java Card. This(cref) is more robust way to test Applet. Although the catch with this is that Sun does not have SCSL(Community Source Licensing) program for Java Card(alas!) and this means you can not mask your applet into this reference implementation unless you get hold of source code somehow(source licensing is one(costly) way)
3. Buy reader/card and figure out how to install applet for
testing purpose.
4. Buy kit from JC vendor containing reader/software/cards and use it
(costly and hard to find JC2.2 implementation)
1 and 2 are easier but not a real life solution(how many cards with intel/sparc processor anyway?). 3 and 4 are ideal but other way challenging. Yes, probably solution-1 is the right for your purpose.
regard, -
dear friend
i am using java card development kit version 2.2.2. i have downloaded apache-ant-1.7.0-bin .i have tried to run the sample code provided by the kit.i n the kit i have seen a HelloWorld Applet. i have compiled it.using the follwing commands
F:\Program Files\Java\jdk1.6.0_05>set JAVA_HOME=F:\Program Files\Java\jdk1.6.0_0
5
F:\Program Files\Java\jdk1.6.0_05>set PATH=%JC_HOME%\bin;%JAVA_HOME%\bin;%PATH%
F:\Program Files\Java\jdk1.6.0_05>cd..
F:\Program Files\Java>cd..
F:\Program Files>cd..
F:\>cd arun
F:\arun>cd apache-ant-1.7.0-bin\apache-ant-1.7.0\bin
F:\arun\apache-ant-1.7.0-bin\apache-ant-1.7.0\bin>set PATH=%PATH%;F:\arun\apache
-ant-1.7.0-bin\apache-ant-1.7.0\bin
F:\arun\apache-ant-1.7.0-bin\apache-ant-1.7.0\bin>cd..
F:\arun\apache-ant-1.7.0-bin\apache-ant-1.7.0>cd..
F:\arun\apache-ant-1.7.0-bin>cd..
F:\arun>cd java_card_kit-2_2_2
F:\arun\java_card_kit-2_2_2>cd java_card_kit-2_2_2-rr-bin-windows-do\samples
F:\arun\java_card_kit-2_2_2\java_card_kit-2_2_2-rr-bin-windows-do\samples>javac
-g -classpath .\classes;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard
\samples\HelloWorld\*.java
F:\arun\java_card_kit-2_2_2\java_card_kit-2_2_2-rr-bin-windows-do\samples>javac
-g -classpath .\classes;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard
\samples\HelloWorld\*.java
F:\arun\java_card_kit-2_2_2\java_card_kit-2_2_2-rr-bin-windows-do\samples>javac
-g -classpath .\classes;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard
\samples\HelloWorld\*.java
F:\arun\java_card_kit-2_2_2\java_card_kit-2_2_2-rr-bin-windows-do\samples>
and now what i have to do to get the output of this applet? can u please help me with detailed description of te steps and commands and the directory from which i have to use those commands
thanks in advance
byeIs there any suggestion for my question?.. :(
Thanks in advance.. -
How to run Java Card 2.2.2 sample Wallet Application?
Hi Friends..
I've downloaded Eclipse Pulsar and Java Card Plugins..
and i tried to make an empty applicatio, and then i loaded all samples application into my empty application..
after that, i tried to set AID for Wallet Applet and for package of Wallet Applet..
I've tried to creates a .CAP file, .EXP file, .JCA file, and scripts file through Eclipse Java Card tools..
and then what else i've to do?..
Please give me any suggestion.., because i'm so dizzy.. :(
Thanks in advance..Sorry, i forgot to ask this question..
Will .cap file installed automatically, when .cap file loaded successfully?
it means that the all packages and applets would be installed automatically, when that all files loaded successfully?
Thanks in advance.. -
How to load Java Card 2.2.1 Wallet application into Real Card?..
Hi Friends..
I've compiled and converted Java Card 2.2.1 Wallet example application
Now, i want to load this wallet.cap file into Java Card..
This is the content of the wallet.opt file :
-out CAP
-exportpath C:\java_card_kit-2_2_1\api_export_files
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x6:0x1 com.sun.javacard.samples.wallet.Wallet
com.sun.javacard.samples.wallet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xC:0x6 1.0Actually, i've loaded HelloWorld.cap into Java Card successfully..
I use this script for load wallet.cap into Java Card :
mode_211
enable_trace
establish_context
card_connect -readerNumber 2
open_sc -security 0 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f
install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500 -sdAID A000000003000000
load -file HelloWorld.capbut i got this output :
C:\GPShell-1.4.2>GPShell Coba.txt
mode_211
enable_trace
establish_context
card_connect -readerNumber 2
* reader name OMNIKEY CardMan 5x21-CL 0
open_sc -security 0 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
f -enc_key 404142434445464748494a4b4c4d4e4f
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
886FC6B03640B06092A864886FC6B040215650B06092B8510864864020102660C060A2B060104012
A026E01029000
Command --> 8050000008C44BBCD614E2FD9D00
Wrapped command --> 8050000008C44BBCD614E2FD9D00
Response <-- 0000715457173C2A8FC1FF02001FB16F1748944AFEC16A7C1135C3669000
Command --> 848200001076F1D58FAF26930630F0D3204AD5EB9B
Wrapped command --> 848200001076F1D58FAF26930630F0D3204AD5EB9B
Response <-- 9000
install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500 -sdAID A0000000030
00000
Command --> 80E602001C09A00000006203010C0108A0000000030000000006EF04C60202000000
Wrapped command --> 80E602001C09A00000006203010C0108A0000000030000000006EF04C602
02000000
Response <-- 009000
load -file wallet.cap
file name wallet.cap
Command --> 80E80000EFC48203BE010013DECAFFED010204000109A00000006203010C0602001F
0013001F000E000B005E001201CD000A003A000000D400000000000001010004000B01020107A000
000062010103000E010AA00000006203010C0601004106001200800302000104040000005CFFFF00
4F00640701CD000543188C0003188F00123D0610088C00028700191E2529041E160441044131191E
2529051E160541044131191E252906AD00191E044116068B0004188B00057A05308F00063D181D1E
8C00073B7A0110AD008B00086104037804780110AD008B00097A0421198B000A2D1A031A032510FC
53381A0325610A1A0425
Wrapped command --> 80E80000EFC48203BE010013DECAFFED010204000109A00000006203010C
0602001F0013001F000E000B005E001201CD000A003A000000D400000000000001010004000B0102
0107A000000062010103000E010AA00000006203010C060100410600120080030200010404000000
5CFFFF004F00640701CD000543188C0003188F00123D0610088C00028700191E2529041E16044104
4131191E2529051E160541044131191E252906AD00191E044116068B0004188B00057A05308F0006
3D181D1E8C00073B7A0110AD008B00086104037804780110AD008B00097A0421198B000A2D1A031A
032510FC53381A0325610A1A0425
Response <-- 009000
Command --> 80E80001EF10A46B037A1A032510806A08116E008D000B1A042575002D0004002000
27003000210040001B0050001518198C000C7A18198C000D7A18198C000E7A18198C000F7A116D00
8D000B7A0324AD008B001061081163018D000B198B000A2D1A072532198B00115B29041F046B0716
04046A081167008D000B1A082529051605107F6E0616056308116A838D000BAF01160541117FFF6F
08116A848D000B18AF0116054189017A0324AD008B001061081163018D000B198B000A2D1A072532
198B00115B29041F046B071604046A081167008D000B1A082529051605107F6E0616056308116A83
8D000BAF011605436308
Wrapped command --> 80E80001EF10A46B037A1A032510806A08116E008D000B1A042575002D00
0400200027003000210040001B0050001518198C000C7A18198C000D7A18198C000E7A18198C000F
7A116D008D000B7A0324AD008B001061081163018D000B198B000A2D1A072532198B00115B29041F
046B071604046A081167008D000B1A082529051605107F6E0616056308116A838D000BAF01160541
117FFF6F08116A848D000B18AF0116054189017A0324AD008B001061081163018D000B198B000A2D
1A072532198B00115B29041F046B071604046A081167008D000B1A082529051605107F6E06160563
08116A838D000BAF011605436308
Response <-- 009000
Command --> 80E80002EF116A858D000B18AF0116054389017A0422198B000A2D198B0013321F05
6D081167008D000B19058B00141A03AF0110084F5B381A04AF011100FF535B381903058B00157A04
22198B000A2D198B00115B32AD001A081F8B001661081163008D000B7A08000A0000000000000000
000005005E0017020000000200000106800900068003000380090803800301010000000600000103
8009020380090503800A01068007010600017A06000121060000C5060001AF0380090403800A0601
80090003800A0703800A0903800A040380090109003A000F131F200D6941110505410E0520091C00
270504072A040607090D
Wrapped command --> 80E80002EF116A858D000B18AF0116054389017A0422198B000A2D198B00
13321F056D081167008D000B19058B00141A03AF0110084F5B381A04AF011100FF535B381903058B
00157A0422198B000A2D198B00115B32AD001A081F8B001661081163008D000B7A08000A00000000
00000000000005005E00170200000002000001068009000680030003800908038003010100000006
000001038009020380090503800A01068007010600017A06000121060000C5060001AF0380090403
800A060180090003800A0703800A0903800A040380090109003A000F131F200D6941110505410E05
20091C00270504072A040607090D
Response <-- 009000
Command --> 80E80003EF07241D06060607080804091215101008040912150D0F050B051907050A
080B00D4010001000000000200090000000000003001000000018004FF820001003B003E00000000
00090041003B000C000000000601004F0048000B000000000401005C003900060000000007010064
0044005F00000000FF0200C50044005A00000000FF0201210044005700000000FF02017A00440033
00000000FF0201AF0044001C0000000000170030003400360039003B0039FFFF003B003E00390040
0042004400440044004400480034FFFF00340042004A004D056800900140033310011004B4310130
01B00241066800A10120
Wrapped command --> 80E80003EF07241D06060607080804091215101008040912150D0F050B05
1907050A080B00D4010001000000000200090000000000003001000000018004FF820001003B003E
0000000000090041003B000C000000000601004F0048000B000000000401005C0039000600000000
070100640044005F00000000FF0200C50044005A00000000FF0201210044005700000000FF02017A
0044003300000000FF0201AF0044001C0000000000170030003400360039003B0039FFFF003B003E
003900400042004400440044004400480034FFFF00340042004A004D056800900140033310011004
B431013001B00241066800A10120
Response <-- 009000
Command --> 80E880040603441004B43200
Wrapped command --> 80E880040603441004B43200
Response <-- 6985
load_applet() returns 0x80206985 (6985: Command not allowed - Conditions of use
not satisfied.)The message error is : load_applet() returns 0x80206985 (6985: Command not allowed - Conditions of use not satisfied
could you help me regarding this?..
Thanks in advance.. :)Sorry, i forgot to ask this question..
Will .cap file installed automatically, when .cap file loaded successfully?
it means that the all packages and applets would be installed automatically, when that all files loaded successfully?
Thanks in advance.. -
How to run java signed applet in vista with changing IE security options
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.j_nanaji9 wrote:
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.Can't be done without changing the security setting. -
How to run java program from website?
Hello
I'd like to know how to run java program from my web page.
I'd like to push some button in this web page so java program that would be on my server
would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
CheersI rather thought about RMI. But I could try servlets. So how it would look like?.
I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
Message was edited by:
macmacmac -
How to configure Java Card 3 in eclipse ?
How to configure Java Card 3 in eclipse ? I have already configured Java Card2.2.2 by following
1) http://eclipse-jcde.sourceforge.net/user-guide.htm
And
2)http://eclipse-jcde.sourceforge.net/
the above two links.B ut for Java Card 3 when i am configuring window->preference->Java Card Home I am getting error as "Converter.jar" not found. i checked the lib and i didnt found these jar. I copied 2.2.2 converter.jar , then that jar file not matching. So please tell me how to configure this.
Thanks in advance
Anoop Michaelthere are many changes between 2.2.2 and 3.0.1. Folders and files are not same. EclipseJCDE is not going to work with JCDk3.0.1. Some one needs to update that plugin :).
There is a NetBeans plugin in progress and you can try downloading latest NetBeans 6.7.1
Some intro about the plugin can be found here http://weblogs.java.net/blog/2009/05/10/sneak-preview-java-card-tools-netbeans-67
You can try Netbeans 6.8 nightly builds for latest changes, but it may be a while until the plugin is stable.
-Anki.N -
How to run .java file in windows ?
How to run .java file in windows without installing any program? Thx!
First, U must make sure that there is JDK on your computer
Then, set the envionment variables which the os can find your compiler and interpreter: javac java
after those, you must complie your .java file to .class file, then you can excute it by java, for example " java helloworld" -
How to run java using xcode?
i have to install "java developer " but i can't find, where i can run Java, Please give me information about "how to run java use xcode " ?
Download the SDK from Oracle, code, enjoy.
-
How to prepare Java Card Assembly files
Hi,
If we rebuilt the API's in Java Card then how could be Java card Assembly files be generated
thanks
muraliThank you Lee and paulcw. Good to know that
information and thank you for your suggestion as
well. Like what paulcw mentioned, not to put
sensitive information in my code. I wrote those
because I need to connect to MS SQL. I just have no
idea how to connect to the database without writing
those codes in the file. Could anyone explain little
bit more on it? Thank you.Create a password file that is accessed by your program. It keeps the passwords out of the developers' hands. (Mandatory practice implemented by our DBAs). -
How to run Java program as Daemon Server in linux
How to run Java program as Daemon Server in linux
i would like to run the java program on system start up in a redhat linux system
can any one provide rc.status filehttp://wrapper.tanukisoftware.org/
-
How to run java servlet without using Web.xml?
How to run servlet without using Web.xml? From a book, I know that web.xml descriptor is optional, but the book doesn't tell us how to run java servelet without web.xm descriptor. So how to do that? Thanks a lot.
How to run servlet without using Web.xml?But Tomcat now uses a web.xml for its global server-wide configuration.
If you'd like to invoke a servlet with:
http://host/servlet/ServletName
you have to enable the invoker servlet.
[from an HTML]
<FORM METHOD="POST" ACTION="/servlet/HGrepSearchSJ">
[from resin.conf of Resin Web Server 2.1.12]
<!--
- The "invoker" servlet invokes servlet classes from the URL.
- /examples/basic/servlet/HelloServlet will start the HelloServlet
- class. In general, the invoker should only be used
- for development, not on a deployment server, because it might
- leave open security holes.
-->
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
[from TOMCAT5.0.19/conf/web.xml, a global server-wide web.xml file]
<!-- The "invoker" servlet, which executes anonymous servlet classes -->
<!-- that have not been defined in a web.xml file. Traditionally, this -->
<!-- servlet is mapped to URL pattern "/servlet/*", but you can map it -->
<!-- to other patterns as well. The extra path info portion of such a -->
<!-- request must be the fully qualified class name of a Java class that -->
<!-- implements Servlet (or extends HttpServlet), or the servlet name -->
<!-- of an existing servlet definition. This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
---comment out below----------------------------------------------------------
<!-- The mapping for the invoker servlet -->
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
--> -
How does the Java Card simulator work? (Using NetBeans)
Hi,
I'm using NetBeans and am trying to simulate:
Someone powering up the card, saving a value, and powering down... And then they power it up again, get the value, and power down.
When I edit my APDU script to do the second part, the value I entered the first time is never stored, which probably means that when I 'run' my code, my application is loaded and everything is initialized again.
How do I edit NetBeans to not install the application every time I hit 'run'? And not to initialize the values, so that when i power it up again, I can get a value stored in a previous running of a script?
When I use powerup, powerdown and then powerup again, NetBeans doesn't powerup the simulator the second time. So understanding the Java Card Simulator would also help... where it is, how it runs, what options it runs with, etc.Hi Shane,
I have not read anywhere else that the JC3 cards are not available, thank you so much for that tip! I am not doing it for research, but I am working on this alone and will have to deploy a card later on. I will be getting all the right versions now.
I'll ask the question then, using just the JCDK:
If I want to save a value on the card, and then need it at a later time, how do I go about it. Do I do the following?
(1) Install the application on the card. (I know how to do this)
(2) Run the simulator using -o "eeprom data filename"
(3) Save the value using the APDU calls and Java code on the card + close connection.
Code:
public class MyApp extends Applet {
private static byte[] data = {0x00, 0x00, 0x00};
// Install method, method to register, process method that can call saveData or recallData, etc
public static void saveData()
// code to change data
data = {0x01, 0x01, 0x01};
public static byte[] recallData()
// code to return data
return data;
}(4) Run the simulator using -i "eeprom data filename". get the value using recallData().
Will selecting the app not make data initialize to {0x00, 0x00, 0x00} again?
If I know this is the correct way of going about it, then I can work towards it getting done.
From other examples I can see that this is probably the way it should work, but my data array always returns as {0x00, 0x00, 0x00}. -
How to start java card development?
Good Evening all,
I am novice for java card development , from last some days I study java card and terms related to it, now i have some knowledge about applets , and API. as i read about java card 2 and 3, I think i moved to java card 2 that's why i download jcdk 2.1.
Now i want to do something in development rather than further conceptual study. Frankly speaking I m confused where to move because different sites have different point of view so i want to execute my knowledge which i earned from last some days...
so I want to ask
1- which IDE would be best for java card development? { eclipse or net beans or something other}
2- what things i would be require during java card application?{ java sdk version? jcdk version? ocf? or what}
3- at start i want to use simulation technique to test what i made and how its work, so for this which tool or IDE would be best work for me,
so kindly request you to guide me and show me the path where i can move and achieve what i want..
---------------------------------------------------------------------------------------------------Thank you in advance------------------------------------------
Edited by: 911936 on Feb 2, 2012 10:01 AMHello umer,
last night it seems very tough to execute sample program of jcdk 2.2 but finally i make it, and i also i got the IDE - net beans that is very good for java card...
I think i should share my knowledge here for next novice people...
----------------------------------------------------------------------------java card development require-------------------------------------------------------------
Because here we use java for java card so we require
1- java development kit (JDK) - use below link to get this.
[get jdk here|http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-windows-i586.exe]
2- Java card require java card development kit (JCDK) I think java card version 3 is latest but i used jcdk 2.2.1
[get jcdk here|http://download.oracle.com/otn-pub/java/java_card_kit/2.2_01/java_card_kit-2_2_01-win-gl.zip]
now i think this is enough to start java card development...
follow below steps
1- install jdk 6 in c:/java/jdk1.6
2-keep jcdk in c:/java_card_kit-2_2
3- open command prompt and run
a)-set JC_HOME=c:\java_card_kit-2_2
b)-set JAVA_HOME=c:\java/jdk1.6
c)-set PATH=%JC_HOME%\bin;%PATH%
4-there are some sample project in scdk, if you want to get confidence , u should run one of them..
run command- jcwde jcwde.app { jcwde is a simulator where u check what u made }
and run this command in another command prompt- apdutool -nobanner -noatr demo1.scr > demo1.scr.jcwde.out
You can get detail of 3 and 4 step from cJDK_Users_Guide.pdf which is present in jcdk.
------------------------this is all which u need to do to get confidence in java card, but dont be over confident because in reality "the ball is not in your court yet"
Note- if you are searching which java IDE is best for java card development then
[click here- this is one of the best ide for java card|http://dlc.sun.com.edgesuite.net/netbeans/7.1/final/bundles/netbeans-7.1-ml-windows.exe]
Edited by: 911936 on Feb 3, 2012 8:58 AM
Maybe you are looking for
-
Problem with preloader from tutorial in flash 8
when i open preloader in flash 8 from section developers for flash, it dosn't work. and trace message but in mx 2004 work ok what problem? **Error** C:\Documents and Settings\Артем\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\C
-
I recently restored my iPhone 4s from back-up after being reset. An app that I had turned off in back-up did not show up in my recent resoration. I forgot to turn the app back on. Would there be any way I would be able to get the data from that app o
-
I have a new computer and I want to use the "MasterPassword" again. How do I import all of the saved website passwords/logins from my old FireFox computer?
-
Database won't start ... need to backup data
Hi, My Oracle 10g Database in an heart beat stop working (I unplugged the network cable and now even with the cable on it won't start ... I've restarted computer lot's of times....) I've wasted too many time triyng to get this thing to work.... I nee
-
Crystal Reports dynamic parameters data source
Database: Sybase ASA 9 Crystal: Developer 11 SP4 , activex viewer Application: Powerbuilder 11 I am embedding crystal reports into a powerbuilder 11 application. The crystal reports (.rpt files) are created in Crystal reports developer 11 sp4. The ap