Hi. i'm running under solaris 10 ... and i have this problem:
running an external aplication from command line in s.o works fine and
no cpu consume.
running from java with runtime.exec the same sh it eats my 85% of cpu
Runtime rt = Runtime.getRuntime();
try {
Process proc = rt.exec("/opt/ANTHaxfov42/bin/XSLCmd -i /opt/
ANTHaxfov42/etc/XfoSettings.xml -d "+ full_xml_file + " -s " +
full_xsl_file + " -o " + full_pdf_file + " -silent");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
any ideas ?
tks !!!!!
Roedy Green - 16 Apr 2008 20:45 GMT
On Wed, 16 Apr 2008 05:28:46 -0700 (PDT), zamba
<CRISTIAN_FERRERO@hotmail.com> wrote, quoted or indirectly quoted
someone who said :
>running an external aplication from command line in s.o works fine and
>no cpu consume.
>running from java with runtime.exec the same sh it eats my 85% of cpu
What happens to the output in both cases?

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Elliot - 24 Apr 2008 18:18 GMT
Hi
I'm having the same kind of problem with:
Process server = Runtime.getRuntime().exec(exeCommand);
"execCommand" is the full path to an .exe file. This takes up to a
minute to load from Java and but the same program runs instantaneously
from the command line. Also CPU utilization is high.
The same Java application is running on many different machines and
the slowdown is only occurring on a few of them. So something is PC
specific but we can't isolate. The PC had 2 gig of memory is a P4 3.07
Gigs.
I wonder if there a different, more efficient Java class to load an
exe?
Anyway, any ideas are more than welcome.
Thanks
Elliot
Matt Humphrey - 24 Apr 2008 18:45 GMT
> Hi
>
[quoted text clipped - 15 lines]
>
> Anyway, any ideas are more than welcome.
Perhaps there's something inefficient in whatever you're using to read the
output and error streams. What are you using for that? (Generally
speaking, not reading them is not optional)
Matt Humphrey http://www.iviz.com/