Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Windows で実行する Java アプリケーションの「exe」ファイルを生成するには、どのコンパイラ (gcj 4.x を使用しています) オプションを使用すればよいですか?
Java プログラム MyJavaProg.java をコンパイルするには、次のように入力します。
gcj -c -g -O MyJavaProg.java
リンクするには、次のコマンドを使用します。
gcj --main=MyJavaProg -o MyJavaProg MyJavaProg.o
次に、リンクして実行可能ファイル mycxxprog.exe を作成します
g++ -o mycxxprog.exe mycxxprog.o