How to run a java program (JPF) from a java app ? urgent!!

Discussion in 'Java' started by naouar.bakkar@gmail.com, Oct 28, 2013.

  1. Guest

    Hi everybody,

    i`m developping a java app about running a java program (exactly java pathfinder) from command.
    So, i placed the folder of jpf-core in a my project and i called the program from my java class as following:

    Process p = Runtime.getRuntime().exec("cmd /c ./res/jpf-core/bin/jpf DiningPhil 4");

    The problem is the programa JPF doesn´t work, but when i place the jpf-core in c:/.. and i call it from my java app it works succefuly!

    Maybe i have to indicate the root of jre in my app or what could be the problem?

    Thanks for your help!

    Noa
    , Oct 28, 2013
    #1
    1. Advertising

  2. Jeff Higgins Guest

    On 10/28/2013 09:08 AM, wrote:
    > Hi everybody,
    >
    > i`m developping a java app about running a java program (exactly java pathfinder) from command.
    > So, i placed the folder of jpf-core in a my project and i called the program from my java class as following:
    >
    > Process p = Runtime.getRuntime().exec("cmd /c ./res/jpf-core/bin/jpf DiningPhil 4");
    >
    > The problem is the programa JPF doesn´t work, but when i place the jpf-core in c:/.. and i call it from my java app it works succefuly!
    >
    > Maybe i have to indicate the root of jre in my app or what could be the problem?
    >
    > Thanks for your help!
    >
    > Noa
    >

    <http://babelfish.arc.nasa.gov/trac/jpf/wiki/user/run#explicit>
    From the JPF intro "...failure is not an option".
    Jeff Higgins, Oct 28, 2013
    #2
    1. Advertising

  3. Roedy Green Guest

    On Mon, 28 Oct 2013 06:08:52 -0700 (PDT),
    wrote, quoted or indirectly quoted someone who said :

    >Hi everybody,

    To call a Java program, you can just call a method in the class. If
    you want to use exec, see http://mindprod.com/jgloss/exec.html
    --
    Roedy Green Canadian Mind Products http://mindprod.com
    Unlike many machines, computers require no water once they are
    manufactured.
    Roedy Green, Oct 31, 2013
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dmitry Olshansky

    JPF

    Dmitry Olshansky, Jun 1, 2004, in forum: Java
    Replies:
    0
    Views:
    643
    Dmitry Olshansky
    Jun 1, 2004
  2. Shawn
    Replies:
    2
    Views:
    1,447
    Shawn
    Dec 6, 2006
  3. Replies:
    3
    Views:
    490
    Daniel Pitts
    Jan 3, 2007
  4. pradeep nair
    Replies:
    2
    Views:
    534
  5. Replies:
    6
    Views:
    527
Loading...

Share This Page