ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Lochart" <>
Subject Re: compiling java to a windows executable...
Date Wed, 04 Aug 2004 21:08:48 GMT
What the gentleman is refering to he will have to implement.  GNU has a
compiler (gjc) that can compile java to an exe for various platforms.  You
can use Ant's exec task to do it but it would probably be best to implement
a new Task that is geared for gjc.  You can always start by looking at the
source that makes up the <javac> task  and then change things to execute
gjc.  Eventually you will be making an exec call out to run the gjc

I hope this clears up any questions


Now I've gained some understanding
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
----- Original Message ----- 
From: "Rhino" <>
To: "Ant Users List" <>
Sent: Wednesday, August 04, 2004 5:00 PM
Subject: Re: compiling java to a windows executable...

> | I know that gcj can do this, and I know that I can set compiler="gcj" in
> | the javac task, but it seems that this will just compile to bytecode.
> |
> | Is there an ant task that will enable me to compile to a windows
> | executable?
> I really don't understand your question so maybe you should ignore this
> note; maybe I'm just not "getting it".
> In 7 years of writing Java code, I've never heard of compiling Java code
> a Windows executable. As I have always understood it, you use the 'javac'
> command to compile to bytecode, then use the 'java' command to execute the
> bytecode under the JVM of your choice. If your JVM happens to be a Windows
> JVM, you have, in effect, a Windows executable. On the other hand, if your
> JVM happens to be a Linux JVM, you have a program that will execute under
> Linux.
> I don't understand what you're looking for. Are you trying to find a task
> that combines 'javac' and 'java' and produces something that only runs on
> Windows??
> Rhino
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message