Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to open multiple files in external editor using java

 
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
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!