gcj compile issues



Hi,

I have plans to compile (under Ubuntu) Java programs to native MS Windows
executables. I have installed mingw32, mingw32-binutils and mingw32-runtime
as well as gcj, gcj-4.0, gcj-4.0-base, java-gcj-compat, libgcj6,
libgcj6-awt, libgcj6-common, and libgcj-common. I'm using the sun JVM. I'm
running Ubuntu 5.10.

I can compile a windows binary using the MingW32 gcc, and a Java class file
using gcj. I haven't found a good howto for creating a Windows binary from
Java code under Linux. I suspect that there's some classpath issues or some
such to be sorted. Can someone who has done this before point me to the
solution?

Thanks,
Roy.

$ uname -a
Linux smallgreybox 2.6.12-10-686 #1 Mon Feb 13 12:18:37 UTC 2006 i686
GNU/Linux
$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
$ i586-mingw32msvc-gcc -o hello.exe hello.c # successfully creates windows
binary from C code
$ gcj -C Hello.java # successfully creates class file from Java code
$ gcj --main=Hello -o Hello.exe Hello.java
gcj: libgcj.spec: No such file or directory
$ gcj -v
Using built-in specs.
Reading specs from libgcj.spec
gcj: libgcj.spec: No such file or directory
--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: gcj compile issues
    ... I have plans to compile Java programs to native MS Windows ... I have installed mingw32, mingw32-binutils and mingw32-runtime ... I can compile a windows binary using the MingW32 gcc, and a Java class file ... using gcj. ...
    (Ubuntu)
  • Re: Weird window close behavior
    ... I have Ubuntu 8, but I'm running real Java, not the pale imitation that GCJ seems to be. ... Doing things this way causes code to be executed from the constructor. ... private JFrame frame = new JFrame; ... Running this code against Sun's Java 6u10, the window closes even after I mouse over the pane. ...
    (comp.lang.java.gui)
  • Re: simple compilaton question
    ... > before I try to compile Main? ... "javac *.java" in each of my java source file directories the first ... with gcj. ... slow to ask for help on mailing lists. ...
    (comp.lang.java.programmer)
  • Re: Weird window close behavior
    ... I have Ubuntu 8, but I'm running real Java, not the pale imitation that GCJ seems to be. ... public static void main{ ... private JFrame frame = new JFrame; ... Running this code against Sun's Java 6u10, the window closes even after I mouse over the pane. ...
    (comp.lang.java.gui)
  • Re: Wheres native Eclipse?
    ... I'm not saying that gcj couldn't be improved, ... A JIT has many ... advantages over a static compiler for langauges like Java. ...
    (Fedora)