• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Runtime.exec() on Linux  RSS feed

 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Let me start by saying I'm having a hell of a time and I'm beginnging to think there is some problem with the implementation of Runtime.exec(). With that being said if anyone has an idea, a clue or even just want's to babble about this, please respond.
You can see more about what I'm trying to accomplish and what I've tried here.
http://www.javaranch.com/ubb/Forum34/HTML/001360.html
Anyway this is what I'm trying now.
I wrote a little shell script to that calls an executable with one argument. I just hardcoded the argument in the script to see if I could get it to work.
So I call me little shell script from a command prompt and voila, it works exactly how I would expect it to. The executable runs with the argument and I get output in the directory I called the script from. Everything is normal, predictable and good.
Now I try to execute the script with Runtime.exec() and it blows up: ERR>/usr/local/vklab/bin/Runrate: line 3: 11340 Segmentation fault (core dumped) /usr/local/vklab/rate/Rate /usr/local/vklab/rate/infiles/sct.dat
Segmentation fault, fun fun
I thought maybe I could open a shell with Runtime.exec() and then try the script with that.
Like so:

And the thing blows up again, Segementation Fault yada yada.
From a prompt, runs great, from Runtime.exec(), blows up. What to do?
Its not like I have a way to step through whatever happens once I pass it to Runtime.exec()? Do I? If no one has an idea for a solution, does anyone at least have an idea of an approach to discover the problem?
regards,
Andrew
 
I found a beautiful pie. And a tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!