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?
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?
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.
Joined: Oct 13, 2005
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.
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
subject: To make a .exe file from java .class files