Launch .exe file from a Jar via Java WebStart

Discussion in 'Java' started by oziris, Jul 15, 2005.

  1. oziris

    oziris Guest

    Hi!

    Does anyone already succeed in running an executable file from a Jar,
    or know how to? The final aim is to perform that via Java Webstart -
    which needs all application files be in a Jar file.

    Here my first draft...

    --- code ---
    URL executable = getClass().getClassLoader().getRessource(...);
    Runtime runtime = Runtime.getRuntime();
    runtime.exec(executable);
    --- /code ---

    .... but that doesn't work. Note that, except for the .exe files, Java
    Webstart deals property with all other ones. Seemingly it's the fact
    that the file is *executed* (in opposition to *read*) that fails.

    The only derived way I've found consists in copying the file under the
    local disk (via InputStream and OutputStream) and running it from this
    location.

    Even you don't know the precise answer, don't hesitate still and all to
    post the minor births of ideas you could have.

    Thanks a lot.

    -m
    oziris, Jul 15, 2005
    #1
    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. Arnold Peters
    Replies:
    0
    Views:
    554
    Arnold Peters
    Jan 5, 2005
  2. oziris
    Replies:
    2
    Views:
    4,329
    Raymond DeCampo
    Jul 15, 2005
  3. oziris
    Replies:
    2
    Views:
    396
    Roedy Green
    Jul 15, 2005
  4. muttley
    Replies:
    0
    Views:
    2,688
    muttley
    Oct 20, 2005
  5. cyberco
    Replies:
    4
    Views:
    3,723
    Roedy Green
    Feb 14, 2006
Loading...

Share This Page