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.

    The only derived way I find 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 birth of ideas you could have.

    Thank you.

    -m
     
    oziris, Jul 15, 2005
    #1
    1. Advertising

  2. oziris

    Roedy Green Guest

    On 15 Jul 2005 01:22:01 -0700, "oziris" <>
    wrote or quoted :

    >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.


    Your biggest problem is finding some free space to put it in.

    All you do is read it as stream of raw bytes and copy it to disk. See
    http://mindprod.com/products1.html#FILETRANSFER
    for sample code to copy the file a chunk at a time. If the exe is not
    that big, you can do read it into RAM and one i/o and write it in one
    to disk.

    Then use exec. See http://mindprod.com/jgloss/exec.html

    I wish there were some easy way to find some permanent disk space with
    JAWS to keep such a file, where it would be safe, and yet would be
    deleted on uninstall. Ditto it would be nice to easily allocate
    yourself a temporary directory.


    Sun goofed in writing its temp file method. The files have nothing
    distinguishing for scavengers to find them later for deletion if
    something goes wrong with autodelete.


    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 15, 2005
    #2
    1. Advertising

  3. Roedy Green wrote:
    > On 15 Jul 2005 01:22:01 -0700, "oziris" <>
    > wrote or quoted :
    >
    >
    >>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.

    >
    >
    > Your biggest problem is finding some free space to put it in.
    >
    > All you do is read it as stream of raw bytes and copy it to disk. See
    > http://mindprod.com/products1.html#FILETRANSFER
    > for sample code to copy the file a chunk at a time. If the exe is not
    > that big, you can do read it into RAM and one i/o and write it in one
    > to disk.
    >
    > Then use exec. See http://mindprod.com/jgloss/exec.html
    >
    > I wish there were some easy way to find some permanent disk space with
    > JAWS to keep such a file, where it would be safe, and yet would be
    > deleted on uninstall. Ditto it would be nice to easily allocate
    > yourself a temporary directory.
    >
    >
    > Sun goofed in writing its temp file method. The files have nothing
    > distinguishing for scavengers to find them later for deletion if
    > something goes wrong with autodelete.
    >

    When you request a temporary file, you can specify a prefix and a
    suffix. This should be enough for whatever scavengers you are referring to.

    HTH,
    Ray

    --
    XML is the programmer's duct tape.
     
    Raymond DeCampo, Jul 15, 2005
    #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. Arnold Peters
    Replies:
    0
    Views:
    611
    Arnold Peters
    Jan 5, 2005
  2. oziris
    Replies:
    2
    Views:
    416
    Roedy Green
    Jul 15, 2005
  3. oziris
    Replies:
    0
    Views:
    419
    oziris
    Jul 15, 2005
  4. muttley
    Replies:
    0
    Views:
    2,767
    muttley
    Oct 20, 2005
  5. cyberco
    Replies:
    4
    Views:
    3,843
    Roedy Green
    Feb 14, 2006
Loading...

Share This Page