The first: in JBuilder: First you have to ensure that the Run menu -> Run Project can run smoothly and then Wizards menu -> Native Executable Builder Select Compress the Contents of the Archive (generating JAR file) Next -> Next- -> Select Always Include All classes and resources again -> Next -> Next -> NATIVE "EXE" -> finish again in the item's Native Executable in the project -> Make can be the second: generate JAR files under CMD as follows: Manifest-Version: 1.0 main-class: main-class-name (Enter) Under CMD: Javac * .java Jar CVFM ABC. JAR abc.txt * .class example - Generates the .jar file first by the mouse to double-click, write the Java source program Test.java as follows:
// Test.java Import javax.swing. *; / ** * @ (#) Test.java * Copyleft (c) 2002 Ratking * @Author Ratking * @Version 0.1, 2002-11-7 * Description: a test Java Application * / Public Class Test Extends JFrame {Public Test (String Title) {Super (Title); this.Exit_on_close; this. GetContentPane (). Add ("Test!", JLabel.center, SwingConstants.Center; this.pack ();} public static void main (string [] args) {try {//uimanager.setLookandFeel UIManager.getCrossPlatformLookAndFeelClassName ()); UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ());} catch (Exception e) {e.printStackTrace ();} test t = new test ( "test - test"); t.setVisibl e (TRUE);}}