Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runtime.getRuntime().exec()

 
Nilesh Joshi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am using Runtime.getRuntime().exec to unzip files on linux server, but after running it, some times i get list of filenames by File.list() and some times i dont, can any one tell me why?

Thanx
Nilesh
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mostly guessing here ...

Are you reading the outputs of the zip program? If not, there may be messages there that you are missing.

Any chance the zip contains paths and is putting the files somewhere you don't expect?

Have you looked into the Zip streams? You can read the zip file to extract the members and write them anywhere you like. Can't say if that would be a good idea or not.

Let me know if any of that helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic