Runtime.getRuntime()

Z

zamba

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 !!!!!
 
R

Roedy Green

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?
 
E

Elliot

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top