Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

file length method not working!!!!!!  RSS feed

 
Suman Dass
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm getting a peculiar error in IO. when i write a simple class with a file object invoking the "length()", it returns the appropriate file size in long. However, when i run the same in a helper class in a j2ee-struts framework, the file size retruns zero (0 bytes)!!! Any idea?
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
File.length() returns 0 if the file doesn't exist. You probably have a different opinion about where the file is than your j2ee server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!