Problemas com JNA. Alguém pode me ajudar?

2 respostas Resolvido
java
S

Estou tentando comunicar um leitor biométrico com minha aplicação Java, eles disponibilizam a SDK que são algumas DLLs e um projeto exemplo Java que utiliza JNA, já coloquei as DLLs no system32 mas quando executo o código o código da IDE ou pela linha de comando aparece o seguinte erro:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Unable to load library 'CIS_SDK': Native library (win32-x86-64/CIS_SDK.dll) not found in resource path ([file:/C:/Users/samuelson/Documents/SDK/Projects%20Exemples/Java/jna/jna.jar, file:/C:/Users/samuelson/Documents/NetBeansProjects/Java/jna/jna.jar, file:/C:/Users/samuelson/Documents/NetBeansProjects/Java/build/classes/])

Quando gero o executável o exemplo funciona normalmente, mas quando rodo a classe principal dentro da IDE da erro. Poderiam me informar se tem alguma configuração que tenho que fazer para poder rodar esse exemplo na IDE para que eu possa debugar? Já pesquisei alguns tópicos e dizem que tenho que configurar a jna path, mas sem sucesso.

Classe:

`package br.com.cis.biox;

import com.sun.jna.win32.StdCallLibrary;

import com.sun.jna.Native;

import com.sun.jna.*;

import com.sun.jna.ptr.PointerByReference;

import com.sun.jna.ptr.IntByReference;

import javax.swing.JOptionPane;

import java.io.File;

import java.io.ByteArrayOutputStream;

import java.io.FileInputStream;

import java.io.FileOutputStream;

import java.io.IOException;

public class Principal extends javax.swing.JFrame {

public interface CIS_SDK extends StdCallLibrary   
{
    CIS_SDK INSTANCE = (CIS_SDK)Native.loadLibrary("CIS_SDK", CIS_SDK.class); 
    
    public int CIS_SDK_Biometrico_Iniciar();
    public int CIS_SDK_Biometrico_Finalizar();     
    public int CIS_SDK_Biometrico_LerDigital(PointerByReference pTemplate);
    public Pointer CIS_SDK_Biometrico_LerDigital_RetornoPonteiro(IntByReference iRetorno);
    public int CIS_SDK_Biometrico_CancelarLeitura();
    public int CIS_SDK_Biometrico_CompararDigital(PointerByReference pAmostra1, PointerByReference pAmostra2);
    public Pointer CIS_SDK_Biometrico_LerDigital_LerWSQ(IntByReference iRetorno, IntByReference iSize);
    public Pointer CIS_SDK_Versao();
} 

  
/**
 * Creates new form Principal
 */
public Principal() {
    initComponents();            
}

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    btnDedo1 = new javax.swing.JButton();
    lblVersao = new javax.swing.JLabel();
    btnComparar = new javax.swing.JButton();
    btnDedo2 = new javax.swing.JButton();
    btnVersao = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    btnCancelarLeitura = new javax.swing.JButton();
    jLabel4 = new javax.swing.JLabel();
    jButton1 = new javax.swing.JButton();
    btnCancelarLeituraImagem = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("CIS SDK Java");
    setResizable(false);

    btnDedo1.setText("Ler digital - Dedo 1");
    btnDedo1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDedo1ActionPerformed(evt);
        }
    });

    lblVersao.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    lblVersao.setText("Versão SDK");

    btnComparar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
    btnComparar.setText("Comparar as 2 digitais");
    btnComparar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCompararActionPerformed(evt);
        }
    });

    btnDedo2.setText("Ler digital - Dedo 2");
    btnDedo2.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDedo2ActionPerformed(evt);
        }
    });

    btnVersao.setText("Ler DLL (Versão SDK)");
    btnVersao.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnVersaoActionPerformed(evt);
        }
    });

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    jLabel1.setText("Ler e comprar as digitais");

    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    jLabel2.setText("Teste de conexão com a DLL");

    jLabel3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
    jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel3.setText("Pasta das imagens: C:\\CIS_SDK\\IMAGENS");

    btnCancelarLeitura.setText("Cancelar leitura");
    btnCancelarLeitura.setEnabled(false);
    btnCancelarLeitura.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelarLeituraActionPerformed(evt);
        }
    });

    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    jLabel4.setText("Ler imagens");

    jButton1.setText("Ler Imagem WSQ");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
        }
    });

    btnCancelarLeituraImagem.setText("Cancelar leitura imagem");
    btnCancelarLeituraImagem.setEnabled(false);
    btnCancelarLeituraImagem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelarLeituraImagemActionPerformed(evt);
        }
    });

    jLabel5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
    jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
    jLabel5.setText("Pasta das digitais: C:\\CIS_SDK\\DIGITAIS");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGap(19, 19, 19)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(btnVersao, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(lblVersao)
                    .addGap(0, 0, Short.MAX_VALUE))
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel4)
                        .addComponent(jLabel1)
                        .addComponent(jLabel2))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(btnCancelarLeituraImagem, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                        .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnDedo1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnCancelarLeitura, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnDedo2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(146, 146, 146)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel5)
                                .addComponent(jLabel3)))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(18, 18, 18)
                            .addComponent(btnComparar, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(27, 27, 27))))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGap(17, 17, 17)
            .addComponent(jLabel2)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(btnVersao)
                .addComponent(lblVersao))
            .addGap(23, 23, 23)
            .addComponent(jLabel1)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(btnDedo1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(btnComparar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(btnDedo2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(btnCancelarLeitura)
            .addGap(28, 28, 28)
            .addComponent(jLabel4)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(btnCancelarLeituraImagem)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(jLabel5)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel3)))
            .addContainerGap(59, Short.MAX_VALUE))
    );

    pack();
    setLocationRelativeTo(null);
}// </editor-fold>                        

private void btnDedo1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    // TODO add your handling code here:

    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    int iRetorno = dll.CIS_SDK_Biometrico_Iniciar(); 
      if (iRetorno != 1) 
      {
        JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
        return;
      }        
      
    btnCancelarLeitura.setEnabled(true);
     
    new Thread(LerDigital1).start();             
}                                        

private static Runnable LerDigital1 = new Runnable() { 
    @Override
    public void run() { 
        try{ 
            // Instanciar a DLL
            CIS_SDK dll = CIS_SDK.INSTANCE;     
                    
            // Capturar a digital no leitor   
            Pointer pDigital;
            IntByReference iRet = new IntByReference();
            pDigital = dll.CIS_SDK_Biometrico_LerDigital_RetornoPonteiro(iRet);
            int iRetorno2 = iRet.getValue();
            
              if (iRetorno2 != 1)
              {
                dll.CIS_SDK_Biometrico_Finalizar();   
                JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno2));              
                return;
              }    
              
            byte[] buffer = pDigital.getByteArray(0, 669);
     
    
            // Criar a pasta e apagar a digital anterior
            new File("C:/CIS_SDK/DIGITAIS").mkdir();  
            File file = new File("C:/CIS_SDK/DIGITAIS/Template1.tpl");  
            file.delete();  
  
            
            // Gravar a digital em um arquivo
            File arquivo = new File("C:/CIS_SDK/DIGITAIS/Template1.tpl");
            try (FileOutputStream arq = new FileOutputStream(arquivo)) 
            {
                
            arq.write(buffer);
            arq.flush();
            arq.close();    
            }
            catch (IOException e)
            {
                e.printStackTrace();      
                JOptionPane.showMessageDialog(null, "Erro !!! ");              
            }                              
      
            // Finalizar o SDK        
            int iRetorno = dll.CIS_SDK_Biometrico_Finalizar(); 
                if (iRetorno != 1)
                {
                    JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
                    return;
                }   
      
          JOptionPane.showMessageDialog(null, "Template gerado!");    
        } catch (Exception e){}       
    };
};    
    

private void btnCompararActionPerformed(java.awt.event.ActionEvent evt) {                                            
    // TODO add your handling code here:
    
    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    int iRetorno = dll.CIS_SDK_Biometrico_Iniciar(); 
      if (iRetorno == 1)  {
        Pointer p;
        p = dll.CIS_SDK_Versao();
        String val = p.getString(0);
        lblVersao.setText(val);          
      }
      else  {
        JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
        return;
      }        
                 
    
    // Ler os arquivos das duas digitais e compara-las  
    try
    {
        // Ler o primeiro arquivo de digitais
        File file = new File("C:/CIS_SDK/DIGITAIS/Template1.tpl");
        FileInputStream fis = new FileInputStream(file);      
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        byte[] buf = new byte[669];
            for (int readNum; (readNum = fis.read(buf)) != -1;)  {
               bos.write(buf, 0, readNum); }
        byte[] buffer1 = bos.toByteArray();            
        
        // Ler o segundo arquivo de digitais
        File file2 = new File("C:/CIS_SDK/DIGITAIS/Template2.tpl");
        FileInputStream fis2 = new FileInputStream(file2);      
        ByteArrayOutputStream bos2 = new ByteArrayOutputStream();
        byte[] buf2 = new byte[669];
            for (int readNum; (readNum = fis2.read(buf2)) != -1;)  {
               bos2.write(buf2, 0, readNum); }
        byte[] buffer2 = bos2.toByteArray();            
        
            
        // Alocar o conteudo dos arquivos nos ponteiros 
        final Pointer p1 = new Memory(669);
        p1.write(0, buffer1, 0, buffer1.length);
        final PointerByReference pr1 = new PointerByReference();
        pr1.setPointer(p1);   
                   
        Pointer p2 = new Memory(669);
        p2.write(0, buffer2, 0, buffer2.length);
        PointerByReference pr2 = new PointerByReference();
        pr2.setPointer(p2);   
        
                    
        // Comparar as duas digitais
        iRetorno = dll.CIS_SDK_Biometrico_CompararDigital(pr1, pr2);
        if (iRetorno == 1)
        {   
           JOptionPane.showMessageDialog(null, "As digitais são iguais");   }           
        else if (iRetorno == -2)          
        {        
           JOptionPane.showMessageDialog(null, "As digitais são diferentes"); }
        else
        {
           JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));                           
        }            
        
    }
    catch (IOException e){
        e.printStackTrace(); 
        JOptionPane.showMessageDialog(null, "Erro !!! ");              
    }
                
  
   // Finalizar o SDK 
   iRetorno = dll.CIS_SDK_Biometrico_Finalizar(); 
      if (iRetorno != 1)
      {
        JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
        return;
      }                 
}                                           

private void btnVersaoActionPerformed(java.awt.event.ActionEvent evt) {                                          
// TODO add your handling code here:
    
    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    Pointer p;
    p = dll.CIS_SDK_Versao();
    String val = p.getString(0);
    lblVersao.setText("CIS SDK - v." + val);          
                                     
}                                         

private void btnDedo2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    // TODO add your handling code here:
    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    int iRetorno = dll.CIS_SDK_Biometrico_Iniciar(); 
      if (iRetorno != 1) 
      {
        JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
        return;
      }        
      
    btnCancelarLeitura.setEnabled(true);
     
    new Thread(LerDigital2).start();                       
}                                        


private static Runnable LerDigital2 = new Runnable() { 
    public void run() { 
        try{ 
            // Instanciar a DLL
            CIS_SDK dll = CIS_SDK.INSTANCE;     
                    
            // Capturar a digital no leitor   
            Pointer pDigital;
            IntByReference iRet = new IntByReference();
            pDigital = dll.CIS_SDK_Biometrico_LerDigital_RetornoPonteiro(iRet);
            int iRetorno2 = iRet.getValue();
              if (iRetorno2 != 1)
              {
                dll.CIS_SDK_Biometrico_Finalizar();   
                JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno2));              
                return;
              }                         
            byte[] buffer = pDigital.getByteArray(0, 669);
     
    
            // Criar a pasta e apagar a digital anterior
            new File("C:/CIS_SDK/DIGITAIS").mkdir();  
            File file = new File("C:/CIS_SDK/DIGITAIS/Template2.tpl");  
            file.delete();  
  
            
            // Gravar a digital em um arquivo
            File arquivo = new File("C:/CIS_SDK/DIGITAIS/Template2.tpl");
            try (FileOutputStream arq = new FileOutputStream(arquivo)) 
            {
            arq.write(buffer);
            arq.flush();
            arq.close();    
            }
            catch (IOException e)
            {
                e.printStackTrace();      
                JOptionPane.showMessageDialog(null, "Erro !!! ");              
            }                              
      
            // Finalizar o SDK        
            int iRetorno = dll.CIS_SDK_Biometrico_Finalizar(); 
                if (iRetorno != 1)
                {
                    JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
                    return;
                }   
      
          JOptionPane.showMessageDialog(null, "Template gerado!");    
        } catch (Exception e){}       
    };
};    


private void btnCancelarLeituraActionPerformed(java.awt.event.ActionEvent evt) {                                                   
    // TODO add your handling code here:
    
    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    // Cancelar a leitura 
    dll.CIS_SDK_Biometrico_CancelarLeitura(); 
    
    btnCancelarLeitura.setEnabled(false);
}                                                  

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    // TODO add your handling code here:
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    int iRetorno = dll.CIS_SDK_Biometrico_Iniciar(); 
      if (iRetorno != 1) 
      {
        JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
        return;
      }        
      
    btnCancelarLeituraImagem.setEnabled(true);
     
    new Thread(LerWSQ).start();                               
}                                        

private void btnCancelarLeituraImagemActionPerformed(java.awt.event.ActionEvent evt) {                                                         
    // TODO add your handling code here:
    // Instanciar a DLL
    CIS_SDK dll = CIS_SDK.INSTANCE;     
    
    // Cancelar a leitura 
    dll.CIS_SDK_Biometrico_CancelarLeitura(); 
    
    btnCancelarLeituraImagem.setEnabled(false);        
}
private static Runnable LerWSQ = new Runnable() {

public void run() {

try{

// Instanciar a DLL

CIS_SDK dll = CIS_SDK.INSTANCE;
// Capturar a imagem da digital em WSQ  
            Pointer pImagem;
            IntByReference iRet = new IntByReference();
            IntByReference iSize = new IntByReference();
            pImagem = dll.CIS_SDK_Biometrico_LerDigital_LerWSQ(iRet, iSize);
            int iRetorno2 = iRet.getValue();
              if (iRetorno2 == 0)
              {
                return;
              }                                    
              if (iRetorno2 != 1)
              {
                dll.CIS_SDK_Biometrico_Finalizar();   
                JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno2));              
                return;
              }                    
            byte[] buffer = pImagem.getByteArray(0, iSize.getValue());

            // Criar a pasta e apagar a imagem anterior
            new File("C:/CIS_SDK/IMAGENS").mkdir();  
            File file = new File("C:/CIS_SDK/IMAGENS/Imagem.wsq");  
            file.delete();  

            // Gravar a imagem em um arquivo
            File arquivo = new File("C:/CIS_SDK/IMAGENS/Imagem.wsq");
            try (FileOutputStream arq = new FileOutputStream(arquivo)) 
            {
               arq.write(buffer);
               arq.flush();
               arq.close();    
            }
            catch (IOException e)
              {
                e.printStackTrace();      
                JOptionPane.showMessageDialog(null, "Erro !!! ");              
              }                              

            // Finalizar o SDK        
            int iRetorno = dll.CIS_SDK_Biometrico_Finalizar(); 
              if (iRetorno != 1)
              {
                JOptionPane.showMessageDialog(null, "Erro: " + Integer.toString(iRetorno));              
                return;
              }                                     
              
           JOptionPane.showMessageDialog(null, "Imagem gerada!");   
            
        } catch (Exception e){}
    } 
};    

/**
 * @param args the command line arguments
 */
public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
     * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
     */
    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException ex) {
        java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>        
    
    
    
    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new Principal().setVisible(true);
        }
    });
}

// Variables declaration - do not modify                     
private javax.swing.JButton btnCancelarLeitura;
private javax.swing.JButton btnCancelarLeituraImagem;
private javax.swing.JButton btnComparar;
private javax.swing.JButton btnDedo1;
private javax.swing.JButton btnDedo2;
private javax.swing.JButton btnVersao;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel lblVersao;
// End of variables declaration

}

`

2 Respostas

L

se o seu sistema for 64bits coloca as dll´s na pasta SysWOW64

S
Solucao aceita

Valeu Lucciano, coloquei na pasta SysWOW64 mas o erro persistiu. Desinstalei o SDK 64bits e instalei o SDK 32bits e resolveu o problema.

Criado 4 de fevereiro de 2016
Ultima resposta 4 de fev. de 2016
Respostas 2
Participantes 2