• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

how good is to call exec() method ??

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
My question is how good is it from performance point of view ot call exec() method from within java program ??
i want to open an xml editor from with in my java program for creating an xsd file ?? my doubt is whether it is a good idea or i should never call exec() for these purposes ??

thanks for help
Oni
 
Author
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
exec() executes another program. Obviously this has all the overheads of the other program and OS process startup overheads.
If speed is important, you will get better performance if you can execute the functionality within your own Java program. Normally exec() is called when the functionality is unavailable, too difficult to implement, or too expensive to include in your Java program. Or when you want the functionality and can happily cope with the secondary process overhead.
--Jack Shirazi http://www.JavaPerformanceTuning.com/
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic