• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

On running external programs in java

 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • 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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic