Results 1 to 11 of 11
  1. #1
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default How to make an execulable file?

    I have designed a program, and I would like to focuss myself on programming real programs. And I would like to learn how to make an file executable. I have tried tutorials on the internet, but can't seen to get them work.

    At the moment I have:
    - 1 file with my code. (.java)
    - 1 file when compiled the code (.class)

  2. #2
    funnyboy's Avatar
    funnyboy is offline Member
    Join Date
    Nov 2010
    Posts
    10
    Rep Power
    0

    Default

    You can embedd it in an html/create an executable .jar file + tell the computer the path to it

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

    Default

    Or simply create an executable jar file.
    That's the java equivalent of an executable file.

  4. #4
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default

    Can you also make the .BAT file stay when I exit TextPad?

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

    Default

    Pardon?
    I don't understand.

  6. #6
    Lund01's Avatar
    Lund01 is offline Senior Member
    Join Date
    Sep 2010
    Location
    The Netherlands
    Posts
    149
    Rep Power
    0

    Default

    He creates a .BAT file (Windows) after I run my program.
    And when I click on that file he also executes my program.
    But when I exit TextPad (I use to write my code), the the .BAT file is gone too.

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

    Default

    Who creates a BAT file?
    I have no idea what you;re on about.

    Create an executable jar. That'll be one file you can double click on to execute.

  8. #8
    funnyboy's Avatar
    funnyboy is offline Member
    Join Date
    Nov 2010
    Posts
    10
    Rep Power
    0

    Red face

    A Batch file to run it would look like that:

    @echo off
    cd "EnterTheDirectoryHere"
    java ClassName

    But it has one con:
    You can't send it to anyone per email or put it on the internet, because .bat files are forbidden in the www.

    To make it look better, you can make a shortcut to it and give it another style

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

    Default

    Hello...*tap*, *tap*, *tap*...is this thing on?

    What's wrong with a jar file?

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,309
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    Hello...*tap*, *tap*, *tap*...is this thing on?

    What's wrong with a jar file?
    Did I hear anything? Nah, 't must be my imagination ...

    kind regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    OP in other words make a jar file... there is a million and one tuts on how to do it... by the way OP means (opening/original poster) I feel I have to say this.

Similar Threads

  1. make jar file
    By safiriss in forum CLDC and MIDP
    Replies: 4
    Last Post: 09-08-2010, 01:20 PM
  2. How to make a jar file?
    By greatmajestics in forum Java 2D
    Replies: 8
    Last Post: 04-25-2010, 04:59 PM
  3. Creating Make File
    By kiki2009 in forum New To Java
    Replies: 7
    Last Post: 07-11-2009, 01:20 PM
  4. how to make header file?
    By rams in forum New To Java
    Replies: 9
    Last Post: 10-24-2008, 08:16 AM
  5. How do you make a jar file
    By alex_cunningham in forum New To Java
    Replies: 3
    Last Post: 07-15-2008, 03:56 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
  •