• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.IllegalArgumentException: Not a directory: C:/Program Files (x86)/Java/Tomcat/webapps/....

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

There is a directory C:\Program Files (x86)\Java\Tomcat\webapps\ROOT\UploadedFiles\ownOI but my program throws error

Here is my code:

When I print its path its correct i.e.:
srcPath==>C:/Program Files (x86)/Java/Tomcat/webapps/ROOT/UploadedFiles/ownOI/


Please advise

Thanks in anticipation

 
K. Tsang
Bartender
Posts: 3604
16
Firefox Browser Java Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably because the path has a space in it. Try enclosing it within quotes (")
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your favorable reply

I tried but same error
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:Probably because the path has a space in it. Try enclosing it within quotes (")


You are perfectly right. You provided a great clue. When I check minutely then I found that at the end of the path there is one extra white tab in the properties file. I just remove this white space and everything started to work fine. Everyday I am learning here a lot of things that are found in rare books but mostly heuristics or experience that I am getting here for free

Thanks from the bottom of my heart
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!