Chuyển đổi file .jar sang .exe

Hướng dẫn theo dõi video: http://congdongjava.com/forum/threads/l%E1%BA%ADp-tr%C3%ACnh-java-desktop-chuy%E1%BB%83n-file-jar-th%C3%A0nh-file-exe-%C4%91%E1%BB%83-ch%E1%BA%A1y-trong-m%C3%B4i-tr%C6%B0%E1%BB%9Dng-window.73/

Chú ý: Mặc dù tạo ra file exe nhưng bạn vẫn cần phải cài Java trong máy đích. Để không cần phải cài Java, hãy đính kèm JRE vào file exe làm theo hướng dẫn: http://www.vn-zoom.com/f215/minh-muon-bien-dich-chuong-trinh-viet-bang-java-thanh-file-exe-2728505.html

Demo: https://www.dropbox.com/s/rmqgekoik0e8xoe/Game%20caro%20exe.zip

Advertisements

Java Tutorial

Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives you a complete understanding of Java.

This reference will take you through simple and practical approach while learning Java Programming language.

Click here: http://www.tutorialspoint.com/java/

Gọi đệ quy hàm main

public class FunctionCallMain {
    private static int a = 0;
    public static void main(String[] args) {
        if (a == 2)
            System.exit(0);
        else ++a;
        System.out.println("This is main");
        callMain();
        
    }
    
    public static void callMain() {
        System.out.println("This is a function call main function");
        main(new String[]{"Son"});
    }
}