← Back to team overview

openjdk team mailing list archive

[Bug 897299] Re: OpenJDK is looking for libpcsclite.so in wrong place on 64-bit 11.10


*** This bug is a duplicate of bug 898689 ***

** This bug has been marked a duplicate of bug 898689
   OpenJDK does not find libpcsc, fails silently, causing smartcard applications to fail

You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.

  OpenJDK is looking for libpcsclite.so in wrong place on 64-bit 11.10

Status in “openjdk-6” package in Ubuntu:

Bug description:
  The OpenJDK codebase contains a class at
  sun.security.smartcardio.PlatformPCSC which looks at the
  sun.arch.data.model to see if it's a 64-but O/S or not. If so, and
  it's not SunOS then it adds a little piece into the library lookup
  path of lib64, thus meaning it looks for


  which doesn't exist in Ubuntu 11.10 as it's now at
  /usr/lib/libpcsclite.so instead.

  There is a workaround of adding
  -Dsun.security.smartcardio.library=/usr/lib/libpcsclite.so as a JVM
  argument to force the library path, but this shouldn't be necessary.

  To see the problem:

  1. obtain a device that runs with pcscd
  2. Compile the following Java code
  3. Run with and without the -D flag above to see the difference (you shouldn't get the "None" provided by "None" message with the flag):

  package com.moo.bug;

  import java.util.List;
  import java.util.logging.Level;
  import java.util.logging.Logger;

  import javax.smartcardio.CardException;
  import javax.smartcardio.CardTerminal;
  import javax.smartcardio.TerminalFactory;

  public class BugDemo {

          private static final Logger log =

      public static void main(String[] args) throws Exception {
          long startTime = System.currentTimeMillis();
          // show the list of available terminals
          List<CardTerminal> terminals;
          try {
              TerminalFactory factory = TerminalFactory.getDefault();
              System.out.println("Factory is: " + factory);
              terminals = factory.terminals().list();
              System.out.println("Terminals: " + terminals);
          } catch (CardException e) {
              log.log(Level.SEVERE, "Could not open terminals: " + e.getMessage(), e);

To manage notifications about this bug go to: