Results 1 to 5 of 5
  1. #1
    jsobel is offline Member
    Join Date
    Apr 2012
    Posts
    68
    Rep Power
    0

    Default Running an exe from a jar

    Ive packaged an exe inside a jar. From a class inside of the jar I want to run the exe how would I accomplish this. Thanks (:

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: Running an exe from a jar

    A jar archive is not such a good place for an executable file.

    You could extract the .exe file to some temporary location and run it from there.

  3. #3
    jsobel is offline Member
    Join Date
    Apr 2012
    Posts
    68
    Rep Power
    0

    Default Re: Running an exe from a jar

    Well i need to run it from a jar because I want it compressed and I want the whole program to come together

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: Running an exe from a jar

    Since it's the underlying OS that needs to run the executable then you will have to extract it, in the same way you would have to for an exe inside a zip file.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: Running an exe from a jar

    Check the API for class names starting with 'Jar'

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 7
    Last Post: 12-18-2011, 04:13 AM
  2. Running in CMD
    By bohrstein in forum New To Java
    Replies: 1
    Last Post: 09-25-2011, 02:36 AM
  3. running
    By aizen92 in forum New To Java
    Replies: 3
    Last Post: 02-11-2011, 07:50 PM
  4. Replies: 0
    Last Post: 08-26-2009, 01:03 PM
  5. Running
    By AWPtic in forum Eclipse
    Replies: 1
    Last Post: 03-24-2009, 06:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •