The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001


where you can ask and answer Java programming questions."> - a resource for Java and Jini developers
Artima | Search | Java | Design | JVM | Jini | Books | Seminars | Subscribe 

Java Answers Forum
January 2001

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


executable jar

Posted by jinaraj on January 29, 2001 at 3:52 AM

This is a class file that displays a Frame.

import java.awt.*;

class Test
public static void main(String ss[])
Frame f=new Frame();

Write one manifest file for it.

Manifest-Version: 1.0
Main-Class: Test

save it as test.manifest

Create a jar file with the following command

jar -cfm test.jar test.manifest Test.class.

This jar file will be executable. Just double click on it, you will see one frame. (The window closing event is not handled)



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us