Unable to connect offcard terminal with jcop simulator

Hi all,
I have made a JavaCard applet, called DisplayApplet.
I am using Eclipse with the JCOP tools plugin.
But now I want to make use of an own Terminal that connects to the applet and communicates to it using APDUs.
I don't have a smart card reader/card, so I want to use the simulation environment.
Now I read that I must use the "Remote" value in the JCTerminal constructor to connect to the simulation environment, but it doesn't work (of course I specify the remote value as input parameter).
I am unable to open a terminal.
I get the following exception at the term.open() command:
can't find/open/connect/reset smartcard/reader:
Failed to open [localhost:8050]: Connection refused: connect
Can anyone tell me what's wrong and how I can connect from an own made terminal to a JCOP simulation (I want to run the terminal within Eclipse, because I want to add a UI later on top of it) ??
Here is the code of my own made HostTerminal:
import com.ibm.jc.*;
public class HostTerminal {
     public static final String remoteTermName = "Remote";
     public static final String nativeTermName = "pcsc:4";
     public static final String remoteTermPara = null;
     public static final String nativeTermPara = null;
     public static void main(String[] args) {
          String termName = nativeTermName;
          String termPara = nativeTermPara;
          if (args.length > 0) {
                               if (!args[0].equals("native")) {
                    if (args[0].equals("remote")) {
                         termName = remoteTermName;
                         termPara = remoteTermPara;
                    } else {
                         try {
                              System.out.println("args[0] > " + args[0]);
                              System.out.println("args[1] > " + args[1]);
                              termName = args[0];
                              termPara = args[1];
                         } catch (Exception e) {
                              System.out.println("invalid command line options");
                              System.exit(1);
          // create terminal, i.e. create a connection to a reader
          // and wait for a card insertion
          JCTerminal term = null;
          try {
               term = JCTerminal.getInstance("Remote", null);
               term.open();
               term.waitForCard(5000);
          } catch (Exception e) {
               System.out.println(
                    "can't find/open/connect/reset smartcard/reader: "
                         + e.getMessage());
               System.exit(1);
          System.out.println("Connected to reader and card terminal ...");
          // now get the object representing the connection to the card
          JCard card = null;
          try {
               card = new JCard(term, null, 1000);
          } catch (Exception e) {
               System.out.println(
                    "can't connect to card in reader: " + e.getMessage());
               System.exit(1);
          String s;
          // get atr of card and print it
          try {
               ATR atr = card.getATR();
               s = JCInfo.atrToString(atr);
               System.out.println("Connected to card and received ATR: " + s);
          } catch (Exception e) {
               System.out.println("can't get ATR: " + e.getMessage());
               System.exit(1);
          // Note here that the DisplayApplet has to have to aid "display". The IDE
          // supports ascii characters in AIDs by using | when editing AIDs.
          // For instance, |display results in 636F756E746572.
          System.out.println("Selecting Display applet ...");
          DisplayApplet displayApplet = null;
          try {
               byte[] aid = ("phil0Display").getBytes();
               displayApplet = new DisplayApplet(card, aid);
               displayApplet.select();
               s = JCInfo.toHex(aid, 0, aid.length);
               System.out.println(
                    "Selecting of Display applet with aid " + s + " succeeded");
          } catch (Exception e) {
               System.out.println("can't select Display: " + e.getMessage());
               System.exit(1);
          }

If you run the JavaCard simulator from within Eclipse make sure you disconnect the JCOP shell before trying to connect via JCTerminal() from your Java program. Use the command /close
If you want to disconnect the JCOP shell automatically modify your "Java Card Application" run-configuration:
set Shell commands to execute: to /close
BTW: You were talking about JCOP 3.0, the Eclipse 2.1-plugin or do you use the new pre-release version JCOP 3.1 for Eclipse 3?

Similar Messages

  • Post Moved Unable-to-connect-to-internet-with-spe...

    post moved http://community.bt.com/t5/Other-BB-Queries/Unable-to-connect-to-internet-with-specific-computer/td-...
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    Ok..So you mean still cannot accessing the website with Internet connection? Try to use nslookup in command prompt to check whether can resolve domain name correctly. Also make sure you can ping the router's LAN IP from computer.
    If not, you can try to use the following DNS servers from OpenDNS.com:
    208.67.220.220
    208.67.222.222
    Hope helps..
    picoHat
    Home Network, Wireless Network and Computer Networking Made Easy

  • I cannot connect to internet eevnthough i have wifi,when im trying to login on FB it says unable to connect and same with YM it saysinternet connections appears to be offline,when in fact the WIFI smartbro is connected,and the signal is very strong...

    my itouch cannot connect to internet...but the other day i can use the wifi im connected,but since yesterday eventhough im connected to wifi and the signal is very strong,when im trying to login on FB it says unable to connect to FB,same with YM it says internet connection is offline when in fact i have a strong signal of wifi..

    - Reset the iPod. Nothing is lost
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points
    Do other devices successfully connect to the network?
    Does the iPod successfully connect to other networks?

  • Unable to connect to network with Safari and Software Update

    A user I support has encountered a problem with networking. He is unable to connect to the network with Safari and Software Update, but IS able to connect and surf with Foxfire and some other programs. Another unusual symptom is that he actually can connect to one web site (which is in his Bookmarks Bar) with Safari, but can't connect to anything else. He's also unable to navigate off of that one site he connects to. When he runs Network Diagnostics, he gets all green lights (no problems). He has fixed permissions, deleted Safari Cache and .plist, rebooted - not fixed yet. He's using 10.4.8 on a PowerPC G4. Any ideas appreciated (this is the wierdest I've seen in a while!).

    Here's what he did. After reading your post, he created another location in his network preferences, entering EXACTLY the same info that was in his old location (he even used the old DNS addresses), except using a new location name. Then he chose the new location and "everything worked". It's one of life's great mysteries. Thanks for your help - it is appreciated.

  • T500 Intel Wifi 5350 is unable to connect automatica​lly with Windows 8.1

    Hello, I have searched the forums to see if there is a similar problem like the one I am having, but, did not come across. I bought my T500 in 2009 with XP installed. I have recently installed Windows 8.1 and started to experience problems with my Intel Wifi 5350. Upon restart, the driver is unable to connect to my home wifi. In order to connect, I need to go through trouble shooting and reset the wifi link, which, then, fixes the problem. When I first installed Windows 8.1, I did not have this problem. It seemed to have happened after a few auto updates.
    The driver software I have is 13.3.0.137 with a date of 8/15/2010. Driver provider is Microsoft. 
    I downloaded but not yet installed Intel® PROSet/Wireless Software for Windows 8.1 Wireless_17.1.0_De164.exe. I am not sure if this will fix it. I wanted to ask this first before I do something. If you have had this before or know the answer, could you please post specific links to which drivers I should install manually? Thanks! I appreciate if you could be specific in your responses as I am not super tech savvy. 

    When I press Fn+F5 I get the charms bar as attached in my 1st post, but not a popup

  • Unable to connect to server with zfh proxy

    I am running an eval of ZfH 5. I'm unable to connect to the server
    with
    zfh proxy. I've tried using the IP address and the server name but
    was
    unable to connect. I have a entry in my hosts file. I using a
    Win2000pro
    and a Novell server running all updates. Any thoughts on this?

    > Hello,
    >
    > Can you check the registry on the ZfH Server machine? Let me know
    if
    the =
    > HKLM\SOFTWARE\Novell\ZENworks for Handhelds\Current Version\Is Using
    =
    > Network value is there, and set to 1.
    >
    > Feel free to email me directly.
    >
    > Dave Kegel
    > Novell, Inc.
    >
    > >>> <[email protected]> 6/23/03 11:02:36 AM >>>
    >
    > I am running an eval of ZfH 5. I'm unable to connect to the server
    =
    > with=20
    > zfh proxy. I've tried using the IP address and the server name but
    was=20
    > unable to connect. I have a entry in my hosts file. I using a
    Win2000pro=20=
    >
    > and a Novell server running all updates. Any thoughts on this?
    >
    >

  • Unable to connect to WLAN with Nokia N95

    Hi
    Just bought a nokia N95 and I'm unable to connect to the WLAN at my work place. No problem connecting to my home WLAN, and there are no problems connecting my laptop to the workplace WLAN.
    I browse for WLANs and select "Start web browsing", the wlan name comes up find and I select it, but after quite some time I get: "Internet: server not found".
    I've read the other posts about assigning a static IP, but the sysadms here will kill me if I try that. Is there another way of getting this to work? It can't be true that the N95 is so picky with WLAN configurations?
    Jens

    Can you post your question on here with the WLAN AP model name, firmware version and N95 sw version (*#0000#)?
    http://discussion.forum.nokia.com/forum/forumdisplay.php?f=121
    Forum Nokia provides a wealth of resources to mobile developers. To be informed about the latest on mobile tools, devices and technologies, register at http://www.forum.nokia.com/main/registration/registration.html

  • Unable to connect to Fios with iTouch

    Gave my wife a iTouch for her birthday but we are unable to connect to our wifi its verizon fios can anyone help?

    duxrider,
    The lock symbol is indicative of your network being encrypted. You are most likely seeing an IP address of 169.x.x.x and a subnet mask of 255.255.0.0 - this is an internal IP address that essentially means you are not connected to your network.
    If you are not the person who setup this network, then you need to contact whomever did set it up. They need to supply you with the encryption method and the password. BTW, you will not be logging in via Safari, you will be logging in via Settings > WiFi.
    If you want to take a look at your network settings, try typing http://192.168.1.1 into your browser. That is the entry point for a number of router models. If you are lucky, no one has set a router password (different from your network password) and you can get in and see how things are setup.
    Here's a link to the user manual for this router:
    http://www.westell.com/images/extranets/pdf/verizonfios_router_9100em_userguide.pdf
    This is a WEP encryption only router. If that is the case, carefully read and understand the section on setting WEP encryption. For the touch, you will want to enable the longer (128 bit) version and note the WEP hex key generated by the router. You will use this instead of a password to log onto your network.
    Message was edited by: luvlabs

  • Unable to connect to internet with my WRT54G router

    I had no problem until a few days ago.  I have it under a secured mode and wanted to unsecure it temporarily.  I got into the 192.168.2.1  and clicked the security tab and got a clock that never seemed to come back to i closed the window.  I went back into internet explorer and could not get into the internet.  I get a popup in lower right saying  Local Area connection.  This connection has limited or no connectivty.  You might not be able to access the internet or some resources.  For more information click this message.   
    Then I get
    Windows could not finis repra the problem because the following actin can not be completed.  Renewing your IP address. 
    I do a setup and get a message
    Unable to connect to the router
    I try pinging the 192.168.1.1  and it times out.
    I do a diagostic and 
    HTTP Error 12007  connecting to www.microsoft.,com  shows up many times.
    I have an Actiontec 701 DSL modem.  I can get into the internet using that only.
    I've tried resetting the router, I've done   what appears to be a firmware upgrade (lights blink etc),  I've tried different power up sequences,  I've tried re-booting.
    What more can I try?

    As of now you are not able to login to your router setup page, and you are getting an error message "Limited or no Connectivity". First you can try is Unplug the Power from your router, wait for 1 min and reconnect the power to your router and check if you connected to the router or still you are getting the same error message.
    If still the same problem persist then Press and hold the reset button for 30 seconds...Release the reset button...Unplug the power cable from your router, wait for 30 seconds and re-connect the power cable...Now re-configure your router...

  • HT1688 my wife has Iphone 3gs she is unable to connect to safari with net 10

    my wife has an Iphone 3gs and has Net10 service but she can't load Safari she had net 10 do a diagnostic on her phone and everything checked out is there a fix to this problem?

    After reading a few more posts, I also tried the following:
    airplane mode on, power off phone, power on phone, airplane mode off, wifi on
    And
    airplane mode on, wifi on, restart phone, airplane mode off, wifi on
    Still unable to connect to ANY wirless network

  • Unable to connect to internet with cable modem

    I have a Imac about 2yrs old. Was running beautifully until lately. My modem shows all solid lights but for some reason it is unable to connect. Did all the things like rebooting, takng out the power cord on my modem letting rest a minutes. Changed the setting to manual from DHCP. Changed it back the other way.
    Can someone help me,
    Biscuit's

    Now when you plug your iBook directly into the modem, the internet works. Correct? Which Airport do you have? Try resetting your Airport. Below are some more links that should be useful...
    Knowledge Base Document #106858 is the Airport Troubleshooting Guide
    Knowledge Base Document #107451 on Resetting the Airport Extreme Base Station
    Knowledge Base Document #106602, which explains How to Reset the Airport Base Station (Dual Ethernet)
    Knowledge Base Document #58613 - Resetting the Airport Base Station (Graphite)
    Airport Express FAQ
    Knowledge Base Document #108044 on Resetting Airport Express
    Knowledge Base Document #166602 troubleshoots I Don't See My Airport Network
    I didn't know what Airport you had, so I included all of them. Select your model and try reseting it. If worse comes to worse, just do a Factory Settings Reset. You will have to configure it like you just took it out of the box. I have found that this usually fixes most AirPort problems.
    Jon
    Mac Mini 1.42Ghz, iPod (All), Airport (Graphite & Express), G4 1.33Ghz iBook, G4 iMac 1Ghz, G3 500Mhz, iBook iMac 233Mhz, eMate, Power Mac 5400 LC, PowerBook 540c, Macintosh 128K, Apple //e, Apple //, and some more...  Mac OS X (10.4.5) Moto Razr, iLife '06, SmartDisk 160Gb, Apple BT Mouse, Sight..

  • PI : unable to connect to IR with cache connectivity test via RWB

    Hi,
    Please help to resolve the issues.
    Server Details: SAP PI 7.0, SUNSOLARIS with DB2.
    PI server was working fine  without  any issues  for the past 2 weeks, Unfortunately  issue is the connection failure.
    PI services were unable to interlink internally.
    cache connection Test Error Below:
    Connection to system null using application null lost. Detailed information: Error accessing "http://sap-02.aig.com:50000/rep/conntest/int?" with user "PIRWBUSER". Response code is 404, response message is "Not Found"
    SLDCHECK done with success,SPROXY no issues,
    users are not locked & password not changed.
    Thanks,
    Bala

    After full cache refresh. with SXI_CACHE i got cache error "UPDATE" detail error as below.
    com.sap.aii.ib.server.abapcache.CacheRefreshException: Connection to system REPOSITORY using application REPOSITORY lost. Detailed information: Error accessing "http://sap-02.aig.com:50000/rep/hmi_service_swc_manager/int?container=any" with user "PIDIRUSER". Response code is 404, response message is "Not Found"
         at com.sap.aii.ibdir.server.abapcache.content.CacheSwc.addContent(CacheSwc.java:63)
         at com.sap.aii.ibdir.server.abapcache.CacheRefreshRequest.addContent(CacheRefreshRequest.java:360)
         at com.sap.aii.ibdir.server.abapcache.CacheRefreshRequest.addContent(CacheRefreshRequest.java:324)
         at com.sap.aii.ibdir.server.abapcache.CacheRefreshRequest.processHTTPRequest(CacheRefreshRequest.java:145)
         at com.sap.aii.ibdir.server.abapcache.CacheRefreshRequest.handleHTTPRequest(CacheRefreshRequest.java:103)
         at com.sap.aii.ibdir.web.abapcache.HmiMethod_CacheRefresh.process(HmiMethod_CacheRefresh.java:67)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.sbeans.HmisBeanImpl.process(HmisBeanImpl.java:86)
         at com.sap.aii.utilxi.hmis.sbeans.HmisLocalLocalObjectImpl1_0.process(HmisLocalLocalObjectImpl1_0.java:144)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:290)
         at com.sap.aii.utilxi.hmis.web.workers.HmisExternalClient.doWork(HmisExternalClient.java:75)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doGet(HmisServletImpl.java:640)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)

  • Unable to Connect Oracle 7 with Data Services 3.2

    Hi All,
    I am incredibly facing an issues with Oracle 7 connecting with Data Services 3.2. with Native client drivers (TNS Names).
    The client legacy application is on Oracle 7, they are moving the data from legacy to SAP ECC. My role is to transfer the data from Oracle 7 to SAP ECC, We are using Data Services 3.2 for conversion. This Data Services 3.2 is not connecting with Oracle 7 by using oracle native drivers (TNS Names).
    I am able to connect Oracle 8 client with SQL *Plus, but with Data Services its not connecting, I am able create Data Store but when try to import the table the error message I am getting like "ORA-24316: Illegal handle Type"
    Is there any other solution for this to connect, or Is Data Services 3.2 will not connect to Oracle 7 since its older version.
    Please reply with your thoughts, or with some solution.
    Appreciate your prompt reply. Many thanks.

    Hi Paul,
    Currently I am using ODBC connection to read the data from legacy Oracle7, but ODBC is very very slow, queries are taking hours to fetch the data. Is there any other solution by chance... I read that DataDirect is the one can connect to any versions of oracle and its bit faster, is that true. Please clarify me. If that is the solution where can I get this DataDirect drivers for oracle 7? Please advice me.
    Thank  You,
    Ashok

  • Unable to connect to network with a new Laptop. ( WRT160n v3.0.02/3 and WRT54G2 v1.0.01)

    Hello, 
    I have never had problems with a Linksys router before until I recently got a new laptop. It was fine for the first few days, but then the connection started dropping and wouldn't come back unless I turned off the router and back on. This started increasing in frequency, so I decided to tweak with my router to find the problem and see if I could solve it.
    This was for a WRT160n v3.0.02 I looked up several suggestions online and decided to update the firmware to v3.0.03 This seemed to only make it worse as I could no longer connect, and when I turned the router off and back on it would allow me in for about a minute and drop me right away. I decided to do a factory reset and set up the network all over to see if this would fix it. Nothing.
    I started tweaking with the settings, and came across some posts here such as this one, started tweaking with the channel settings and everything. Nothing. If anything I somehow made it worse since now instead of dropping repeatedly it wouldn't connect at all except for about a minute after restarting router, then it would drop completely (I would either get the limited access notification or I simply couldn't connect and windows said to unplug the access point. (...again)
    Fed up, I recalled I had another Linksys router that I wasn't using in storage, a WRT54G2v 1.0.01 so I set that up, no problems... at first. All other devices picked it up right away, but once again, my new laptop decides it's too good for the freaking network and drops it repeatedly telling me there's a problem with the access point. 
    So at this point I'm thinking it might NOT be my network, but my wireless card or something, I uninstalled and reinstalled, updated drivers, (I use a Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC) I even came across this article and disabled browser service and NETBios (including all other devices on my network). It brought back the network on my laptop for a bit, only to smugly come crashing down again. 
    I've tried setting a static IP, I set my priority to highest on QoS, I've tried factory resetting both routers TWICE. I'm at my wits' end and I dunno what else to try, I'd greatly appreciate any help I can get.
    I have a cable connection, modem works just fine, signal is fine if I connect it directly to modem, also if I connect it through the router, no problems whatsoever, the only problem seems to be the wireless on my new device. OTL

    Hi roseyrosho,
    You may try this link below on how to determine the correct  MTU (Maximum Transmission Unit) size. I hope this will help.
    Determining and setting up the correct MTU size

  • Why am I unable to connect to internet with my mac?

    When I try connecting my macbook air to the wireless internet it keeps saying the WPA2 password is incorrect but it isn't. Can I connect my mac to internet by using the rooter wireless button like I use to with my PC?

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

Maybe you are looking for

  • How to suppress Save As dialog when using the Close button on an editable pdf

    Environment: Windows 7, SDK 9, Adobe Acrobat Pro X, Visual Studio 2010 Professional Summary: when a document is opened for editing using automation, edited, then closed using the "Close" button, the confirmation dialog appears, "yes" is selected and

  • Training and Event management.Process Flow..

    Hi, Experts, Can any body give me some notes on  Training and event management and process flow also like integration between ECC-6.0 to Non SAP 1.Training request 2.Appraisal documents for performance feedback 3.Tracking Feedback processes Pls help

  • How to post a link (URL) in "Apple Discussions"

    You can shorten your links (URLs) by using HTML coding. This is preferable when the URL is very long. Posting the entire URL can extend the width of a post beyond the range of many computer screens. This can make a post difficult to read, as it neces

  • Aggregate Function in SQL subquery

    Hello, I am trying to use the following syntax and it is saying I can't use an aggregate function in a subquery. I can't use a GROUP BY in this case because if another field in the project table (such as status) is different, that project will show u

  • Best workflow for round trip editing?

    I understand that iPhoto does not support (yet) round trip editing, i.e. a RAW file can be sent from within iPhoto to an external editor but the resulting edited file cannot be saved back directly into iPhoto but has to be temporarily stored somewher