• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Making a .exe File.

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made a swing application and made an executable JAR file. Thats working properly.
But it works only in the machines which have JDK installed.
So i want to make an .exe file for that.
How can i make a .exe file. Does a exe file runs even JDK is not installed?
Tell me the process of making a .exe file.
 
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bharadwaj Adepu:
I have made a swing application and made an executable JAR file. Thats working properly.
But it works only in the machines which have JDK installed.
So i want to make an .exe file for that.
How can i make a .exe file. Does a exe file runs even JDK is not installed?
Tell me the process of making a .exe file.



First thing it is not an advanced question.

I had the same query when i first joined in this forum and i got the answer.
I don't have time to personally check that one so here i point you to that thread
[ January 24, 2008: Message edited by: Balasubramanian Chandrasekaran ]
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is extremely unusual to compile Java code directly to a native executable. It's right against the spirit of Java. I don't know whether the native compiler mentioned in the linked topic really allows all Java features to be used, either.

You should take your lead from Sun, the inventors of Java, who never mention the possibility of compiling to native executables.

Much more usual would be something like Java Web Start, to manage the location and/or installation of a Java Runtime Environment (JRE). Or you could use a proper installer like InstallAnywhere, which will install the JRE with your application.

Why do you think you really want an EXE native executable file?

If you really want an EXE native executable, perhaps you shouldn't be using Java at all.
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Java, an executable JAR file is the EXE! But you will need the JRE installed in any case.
 
Peter Chase
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Petrus Pelser:
In Java, an executable JAR file is the EXE! But you will need the JRE installed in any case.



In the thread pointed to by previous poster, there was a link to a genuine native compiler for Java. This really does produce an EXE native executable, which does not need a JRE.

However, this is a very un-Java thing to do, and not recommended in all but the most specialised cases.
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic