• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

On running external programs in java

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i need some help with my code, i'm trying to run several .exe files, i am currently using Runtime.getRuntime().exec. It works fine with the first exe command, however it stops there and does not perform the other commands following it.
here is a sample of my code:
============================================================================
Runtime p = Runtime.getRuntime();
p.exec("randinit -din skin.dat -cout skin.cod -xdim 100 -ydim 96 -topol hexa -neigh bubble -rand 123");
System.out.println ("Initialization Done");
//first map training
Runtime p1 = Runtime.getRuntime();
p1.exec("vsom -din skin.dat -cin skin.cod -cout skin.cod -rlen 1000 -alpha 0.05 -radius 10");
System.out.println ("First Training Done");
============================================================================
this either only runs the initialization part but does not perform the training part or it performs both simultaneously, therefore not producing the correct results since what i need is for them to run one after the other. How can i do this? please help. thank you very much.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't post the same question in multiple forums. It just wastes people's time. I'm closing this duplicate thread.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic