Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to open multiple files in external editor using java  RSS feed

 
ravi v kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

i want to know, how to open multiples files in an external editor using java.
as i have to monitor logs my applications. so i looking for to opening multiples files[logs] on single click. Thanks
[ May 01, 2007: Message edited by: ravi v kumar ]
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way is to pick an editor you know exists, and use the Runtime.exec() call to open the files. If you were using some sort of *nix OS, the following code would try and open all files in a directory with "gvim".


Note that this is a rather trivial example (exceptions not really handled, error checking lacking, etc...)

Hope that helps,

Darrin
 
ravi v kumar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks You! i made changes as you said. it worked
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!