• 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

To make a .exe file from java .class files

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
How can i create a .exe file from a java .class files?
I have a A.class file and B.properties file
A.class uses B.properties file and does some operations,both the files are working fine.
How do i create a .exe file from this?

Thanks in advance,
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
this topic has been discussed many times, check it here, here and here


Hope this helps
 
vanlalhmangaiha khiangte
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks..
 
vanlalhmangaiha khiangte
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have created the jar file, as given in the example ...
When i run from the command prompt java -jar C.jar ... The output is shown.. ( i have read the file and some exceptions are shown as the file path i have put in the properties file do not exists)
When i doubleclick on the jar file , nothing happens , it just exits ..
Is this behaviour ok ?
Can the windows console come up and display the error?

Thanks,
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You get different behaviours on different platforms. Your jar is obviously all right if you get it to run from the command line. You may have problems about setting up an association, ie that if it is a .jar file, your Java runtime runs it.

I Googled and found two links, Sun and sourceforge. They are a little bit old, but they aill probably help you. I don't think you can get a console by double-clicking a .jar icon, I am afraid.
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course, if you are getting Exceptions and nowhere to show them, the application will simply vanish. Make sure you get rid of the Exceptions first.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
if your program has nothing to do with user input or wait for event, then it will "simply exit".
You will experience the same thing with a sample "Hello World !" program.
In fact it does not simply exit, it outputs and then exits but everything happens all of a sudden (thats why we used to use getch(); in C )


Hope this helps
reply
    Bookmark Topic Watch Topic
  • New Topic