• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java directory  RSS feed

 
abalfazl hossein
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I want to check listFiles() method. I check this program on current directory that JAVA was runnig.But it has error

Exception in thread "main" java.lang.NullPointerException
at filedir.Main.main(Main.java:18)
Java Result: 1
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you are checking the "build.xml" file, which doesn't look like a directory to me. And which line are you getting the Exception on? 18? What does line 18 say?

Read carefully what the method returns.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!