Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Want to write a card trigger.

936354Mar 7 2013 — edited Mar 8 2013
Flow:
Card Trigger -> Host Application -> Applet -> Host Application -> Backend Application

This trigger will only contain a text box with an ID and a button that simulates the card inserted.
then onCardInserted will be triggered, it will create an applet and returns an id to the host application,
After that it will notify the backend system.
I can't afford a third party shell program to do that.
So in order to write such a trigger, do I just put a byte stream to port 9025 of the localhost?
Am I on the right track?


But
private void BuildSocket()
	{
		        
	       Socket client = new Socket();
	       InetSocketAddress isa = new InetSocketAddress("127.0.0.1", 9025);
	       try {
	           client.connect(isa, 10000);
	           BufferedOutputStream out = new BufferedOutputStream(client
	                   .getOutputStream());
	           // 送出字串
	           //out.write("Send From Client ".getBytes());
	           
	           out.write(textField.getText().getBytes());
	           
	           out.flush();
	           out.close();
	           out = null;
	           client.close();
	           client = null;

	       } catch (java.io.IOException e) {
	           System.out.println("Can't establish Socket !");
	           System.out.println("IOException :" + e.toString());
	       }
     } 
Opened the 9025 port by firewall already. Still can't connect to my host application after starting both applications? Why.
Do Open card framework's applications by default sits on port 9025?

Thanks
Jack

Edited by: 933351 on 2013/3/7 下午 6:55

Edited by: 933351 on 2013/3/7 下午 6:55

Edited by: 933351 on 2013/3/7 下午 9:45

Edited by: 933351 on 2013/3/7 下午 10:03

Edited by: 933351 on 2013/3/7 下午 10:16

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 4 2013
Added on Mar 7 2013
0 comments
168 views