Questions tagged [smartcardio]

Use this tag for questions related to Java Smart Card I/O API

Java Smart Card I/O API is a Java API for communication with Smart Cards using ISO/IEC 7816-4 APDUs. It thereby allows Java applications to interact with applications running on the Smart Card, to store and retrieve data on the card.

30 questions
5
votes
2 answers

javax.smartcardio.* is not found on Open JDK 11(Redhat)

I am using Redhat's OpenJDK 11 to communicate with a smart card on the Windows. But I have a problem with compiling. It said cannot find javax.smartcardio library. Enviornment : Redhat OpenJDK 11, Intellij, Kotlin, Gradle > Task :compileKotlin e:…
Pemassi
  • 612
  • 1
  • 7
  • 20
4
votes
0 answers

Smart Card detection with java

i'm using the following code to test whether there is a smart card connected to computer or not public static boolean verifySmartCardPresence() { boolean cardPresent = false; try { TerminalFactory tf = TerminalFactory.getDefault(); …
Elarbi Mohamed Aymen
  • 1,617
  • 2
  • 14
  • 26
3
votes
2 answers

send buffer directly to a smartcard

I need to send a message to a smartcard. First of all, I sent it using gpshell in order to test the correctness and get an answer: send_apdu_nostop -sc 0 -APDU…
Rudy Barbieri
  • 389
  • 1
  • 4
  • 16
3
votes
2 answers

javax.smartcardio in Java 9, 10, 11, 12... etc

What happened to the javax.smartcardio library from Java 9 onwards? Is there an alternative or some way to obtain it in JAR?
2
votes
1 answer

Eclipse doesn't recognize smartcardio library

After migration from Sun's jdk (1.8) to Openjdk12 - Eclipse does not recognize the whole library of "javax.smartcardio". for example: import javax.smartcardio.Card; will cause the errors Card cannot be resolved to a type The import…
Shlomi Levy
  • 29
  • 1
  • 4
2
votes
1 answer

Command APDU returning 6985 (Conditions of use not satisfied) in result

I am working on reading a smart card in Java. When I execute the following code below, the card returns 6985 (Conditions of use not satisfied) as a result. TerminalFactory factory = TerminalFactory.getDefault(); List terminals =…
1
vote
1 answer

Trouble writing NDEF record to NTAG213 using external NFC reader (but writing to memory works)

I am using the sample provided by Michael Roland in this answer and modified the bytes command structure to match this answer. After I scan the tag, I receive 90 00 responses from the reader. When I then scan the tag using NFC Tools though, I don't…
policenauts
  • 512
  • 6
  • 18
1
vote
0 answers

Java smartcardio // transmitControlCommand response is always empty // ACR 39

after very useful tips from user vlp, I have finally been able to connect to an AT24C16 I2C card with my ACR39 card reader through the java smartcard API (original thread). Since the free memory card I want to read is not a smart card, I need to use…
Tom
  • 83
  • 7
1
vote
3 answers

Write Data to NFC smartcard in Java

I was asked to write a simple program to read and write data from smart card (MIFARE) using NFC but I am stuck. I have to get the UID (so far so good), write some datas taken from a DB in some of the blocks of the card (no way). I have to use Java…
SCdev
  • 101
  • 2
  • 12
1
vote
1 answer

Sending APDU commands to Write Data to a smartCard Reader using java smartcardio functions

I am trying to write data to contactless card in HID Omnikey 5122 device using java smartcardIO functions. The Data that I need to insert to the card is {00 01 02 03}. APDU command I am trying to send through channel.transmit function is {FF D6 00…
Suni
  • 11
  • 2
1
vote
1 answer

Jenkins gives access restriction for javax/smartcardio

For a Java / OSGi project I need to communicate with a smartcard plugged to my computer. I do this using the package javax.smartcardio. When I first imported this package and wanted to use it, Eclipse anounced an error "Access restriction: The type…
Bilbo
  • 63
  • 1
  • 7
1
vote
1 answer

Error loading PKCS keystore with multiple card readers

I am running into a weird problem when reading CAC card, in a multi terminal setup, from Nth (Except 1st) terminal. Environment - JDK8_u211, Destop without any card reader, Internal card reader for laptop, USB card reader, CAC\PIV card USE-CASE…
avid-dev
  • 13
  • 4
1
vote
1 answer

Read data from smart card (CNS/CNR)

I wrote a program using java card that allows me to read some data from a smartcard. The file system of the card is structured as follows: Smart Card File System The smart card is a card of the Italian public administration. I can correctly connect…
1
vote
1 answer

Javacard how to remove and reinsert card without raising exception from checkState() in CardImpl.class

I'm having trouble finding the solution to this problem in my program: I create and personalize a JCOP card with the JMRTD library, but, after I finish, send the close command to the service, and insert the card again, any attempt to do anything…
Luca
  • 11
  • 2
0
votes
1 answer

Smart Card 61 xx Error - what exactly does this mean?

I've installed an applet I've written onto a smartcard - but when sending commands to it, keep getting the 61 xx response. This doesn't happen when I run it in JCIDE, only when on an actual card. I understand that a response of 61 xx means 'response…
LozCodes
  • 109
  • 8
1
2