How to Create Executable jar file from .java file. Having only one java file dm.java which created using awt and applet. I need to create executable jar with icon or with im
To do this you have to include file MANFEST.MF into META-INF directory of your jar. The manifest must contain attribute Main-Class. Its value is the fully qualified class name of your main class, i.e. class that is the entry point to your application.
See http://download.oracle.com/javase/1.4.2/docs/guide/jar/jar.html for details.
Icon is different. If you are speaking about icon that appears on the left upper corner of your application window use frame.setIconImage(image).
If you are asking about the icon that appears on your command window this is platform specific and could be achieved by running script.