The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement
where you can ask and answer Java programming questions.">
artima.com - 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.

Message:

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();
f.setSize(200,200);
f.show();
}
}


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)

Jinaraj





Replies:

Sponsored Links



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