• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

processes mysteriously not launched

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why is it that certain programs (and non *.exe's) dont launch when

where pathList is an ArrayList which contains... a list of paths...

anyway, no error message pops up, the programs just dont launch, and certain progs leave processes in memory bearing their namesake, but theyre not actually doing anything. whats goin on?
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Runtime.exec is a tricky beast; it is not -- repeat, NOT -- directly analougous to C's system() command. The action that you describe could be the case for any number of reasons: The path identified is not executable by the system, you are including command-line parameters in the path (Runtime.exec really doesn't like that, in my experience...), etc.

There are a number of ways around this -- most of them are system-dependant. You could write a batch file/shell script and execute the batch file. You could use JNI write a native method the simply calls the system() command. If you poke and prod Google, I'm sure that it would tell you different ways to get around this.

That said, I can't give a much more specific answer without having a more specific example....
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what you are trying to execute, but take a look at this article:

When Runtime.exec() won't

It gives some examples of how to get the exit code and STDOUT and STDERR output.
reply
    Bookmark Topic Watch Topic
  • New Topic