gcj compile issues

Olafur Arason olafra at gmail.com
Wed Mar 1 19:39:26 UTC 2006

Try using this http://www.thisiscool.com/gcc_mingw.htm
I don't know if it work on linux but you can try.
There is also an other interesting solution from gcc-cil
use gcj to compile the java code with --target=clr-unknown-none
then go to the gcc subdirectory and compile with mingw32,
don't know if it will work but an interesting solution non the less.
You can also use wine and follow the instuctions on

Hope it helps

Olafur Arason

On 2/28/06, Roy Britten <roy.britten at gmail.com> wrote:
> 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 at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

More information about the ubuntu-users mailing list