• Post Reply Bookmark Topic Watch Topic
  • New Topic

Erro NullPointerException  RSS feed

 
Fernando Skackauskas
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a program that makes biometric authentication in two versions:

1) the user selects the binary file via javax.swing as follows:

public class Busca extends javax.swing.JFrame {
...
java.io.FileInputStream fis = null;
fis = new java.io.FileInputStream (fs_at.getSelectedFile ());
nLoadLen = fis.read (loadData);
int = retornoexp exportEngine.ImportFIR (loadData, nLoadLen, nMinType, hLoadFIR);


2) in the other version, I run the program via the command line and the file is passed as a parameter, thus:

public int autentic_python (String file) {
.....
fis = new java.io.FileInputStream (file);
nLoadLen = fis.read (loadData);
retornoexp exportEngine.ImportFIR = int (loadData, nLoadLen, nMinType, hLoadFIR);


THE PROBLEM IS THAT IN THE SECOND VERSION, GIVE ERROR "java.lang.NullPointerException" AT THE COMMAND exportEngine.

WHAT AM I DOING WRONG ???
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In what line you are getting error? May be you passed null in the file name instead of any valid name.

Need more information to help you.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fernando Skackauskas wrote:THE PROBLEM IS THAT IN THE SECOND VERSION, GIVE ERROR "java.lang.NullPointerException" AT THE COMMAND exportEngine.

WHAT AM I DOING WRONG ???

You're shouting. Please KeepItDown.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!