Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: How to create exe file

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry How to create exe file

    Hi all,

    I have several class files. i need to create one exe file. and when we install this exe file then all forms will be display in GUI format one by one. How can i do this.. please any one can help me??


    TQs
    kris


  2. #2
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Posts
    834
    My Mood
    Cynical
    Thanks
    7
    Thanked 105 Times in 90 Posts

    Default Re: How to create exe file

    Java doesn't have exe's it use's .jar runables. Try googling jar files and read up on suns website

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to create exe file

    There are a few programs which can wrap a jar file into an exe. First take Freaky Chris' advice and read up on how to create an executable jar file. This jar will function exactly as an exe. But if you really want an exe, get a program such as Launch4j (there are other programs as well, but this is the only one that I've used) and use it to wrap your jar into an exe.
    Last edited by copeg; October 29th, 2009 at 08:57 AM.

  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: How to create exe file

    See the similar threads list at the bottom.

    http://www.javaprogrammingforums.com...e-exe-jar.html

    // Json

  5. #5
    Junior Member
    Join Date
    Nov 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How to create exe file

    Making a exe would make your program Windows specific. But if you are sure about it
    I guess you are looking for something like a installer for your java program. [Checkout Nullsoft Installer Tool]

    Its a open source and can be used to create windows installation

  6. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: How to create exe file

    Nullsoft doesn't actually make windows executable files. It's an installer in that it puts files in the correct locations and sets up certain Windows-specific registries and system variables so your program can run. I would just pack your program into an executable jar file via Eclipse, then in any OS that has Java, you can double-click on the executable and run it as if it were a real executable file, and it would be platform independent.

  7. #7
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: How to create exe file

    I've used NSIS before to create an installer .exe file which just does one thing and that is pack my jar in it and run it upon execution. Worked alright actually.

    // Json

Similar Threads

  1. Java error "could not create java virtual machine"
    By aubrey4444 in forum Java Theory & Questions
    Replies: 17
    Last Post: October 3rd, 2010, 12:51 PM
  2. How to create a database in my cell phone?
    By Viggopiano in forum Java ME (Mobile Edition)
    Replies: 2
    Last Post: July 12th, 2010, 07:26 AM
  3. how to create exe jar
    By ttsdinesh in forum Java Theory & Questions
    Replies: 1
    Last Post: September 27th, 2009, 08:21 AM
  4. [SOLVED] How to dynamically create ArrayLists (or something similar)?
    By igniteflow in forum Collections and Generics
    Replies: 4
    Last Post: August 6th, 2009, 06:00 AM
  5. Replies: 0
    Last Post: February 3rd, 2009, 01:15 AM