You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sarika Sahni <ss...@simdesk.com> on 2004/09/20 23:49:04 UTC

Error starting modern compiler

Hi, 

I am new to Ant and am trying to compile some java sources on Linux. I have
the ANT_HOME, JAVA_HOME and ANT_OPTS setup correctly on Linux machine but
compiling the Java sources keeps giving me the error "Error starting modern
compiler" followed by system out of resources: Java.land.outOfMemoryError. I
tried changing the heap allocation size via the ANT_OPTS parameter varying
from -Xmx256M to -Xmx600M, but to no avail.

I can get my Java sources to compile fine on the Windows machine with heap
size -Xmx256M. Also, I can compile my CPP sources fine on Windows and Linux
setup using Make. Wonder what is wrong with my system configuration for Java
compile on Linux.

I appreciate any help on this and sorry to repeat it this has already been
posted in past. 

Thanks,
Sarika


Re: Error starting modern compiler

Posted by Sarika Sahni <ss...@simdesk.com>.
Hi Stefan,

I have installed the standard ant from the apache website, and no there is 
no /etc/ant.conf.
The ant -debug gives the tools.jar in the correct location: <path to the 
jdk>/j2sdk1.4.2_05/lib/tools.jar.

Thanks,
Sarika
ps:
Now its giving system out of resources: java.lang.outOfMemoryError. Maybe I 
should increase the heap size and try again!

----- Original Message ----- 
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Tuesday, September 21, 2004 2:35 PM
Subject: Re: Error starting modern compiler


> On Tue, 21 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:
>
>> Yes it is a full SDK install and $JAVA_HOME/lib does contain
>> tools.jar.  Is there anything else I might be missing?
>
> Yes, please run ant -debug to see where Ant tries to find tools.jar
> and maybe get a hint about why it fails.
>
>> I am on my way to download and install the JDK5 now, hoping for some
>> magic.
>
> I don't expect that to change anything.
>
> What kind of Ant is installed by that Mandrake install.  Do they ship
> "our" ant shell script or something of their own?  Is there an
> /etc/ant.conf on your system?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 21 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:

> Yes it is a full SDK install and $JAVA_HOME/lib does contain
> tools.jar.  Is there anything else I might be missing?

Yes, please run ant -debug to see where Ant tries to find tools.jar
and maybe get a hint about why it fails.

> I am on my way to download and install the JDK5 now, hoping for some
> magic.

I don't expect that to change anything.

What kind of Ant is installed by that Mandrake install.  Do they ship
"our" ant shell script or something of their own?  Is there an
/etc/ant.conf on your system?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Sarika Sahni <ss...@simdesk.com>.
Yes it is a full SDK install and $JAVA_HOME/lib does contain tools.jar.
Is there anything else I might be missing?

I am on my way to download and install the JDK5 now, hoping for some magic.

Thanks,
Sarika
----- Original Message ----- 
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Tuesday, September 21, 2004 2:10 PM
Subject: Re: Error starting modern compiler


> On Tue, 21 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:
> 
>> Java version 1.4.2_04-b05. Java HotSpot client VM (build
>> 1.4.2_04-b05, mixed mode).
> 
> The full JSDK, not only a JRE, I assume.
> 
>> 'which ant' and 'ant -verison' just gives me the version 1.6.2 so I
>> assume I dont have any other ant verison installed.
> 
> Good.
> 
> Is JAVA_HOME set to anything sensible?  Ant needs to locate tools.jar
> in order to run <javac>.  Is it there?  It should be in
> $JAVA_HOME/lib.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 21 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:

> Java version 1.4.2_04-b05. Java HotSpot client VM (build
> 1.4.2_04-b05, mixed mode).

The full JSDK, not only a JRE, I assume.

> 'which ant' and 'ant -verison' just gives me the version 1.6.2 so I
> assume I dont have any other ant verison installed.

Good.

Is JAVA_HOME set to anything sensible?  Ant needs to locate tools.jar
in order to run <javac>.  Is it there?  It should be in
$JAVA_HOME/lib.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Sarika Sahni <ss...@simdesk.com>.
I am using Mandrake Linux 10. Java version 1.4.2_04-b05. Java HotSpot client 
VM (build 1.4.2_04-b05, mixed mode). I did install Ant from the mandrake 
linux distribution, as I dint find it in the standard Mandrake install. the 
version I have is: apache Ant 1.6.2 compiled on July 16, 2004. doing 'which 
ant' and 'ant -verison' just gives me the version 1.6.2 so I assume I dont 
have any other ant verison installed.

Thanks,
Sarika

----- Original Message ----- 
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Tuesday, September 21, 2004 4:23 AM
Subject: Re: Error starting modern compiler


> On Mon, 20 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:
>
>> I am new to Ant and am trying to compile some java sources on
>> Linux. I have the ANT_HOME, JAVA_HOME and ANT_OPTS setup correctly
>> on Linux machine but compiling the Java sources keeps giving me the
>> error "Error starting modern compiler" followed by system out of
>> resources: Java.land.outOfMemoryError.
>
> Can you give us more details of your installation?
>
> In particular we'd need to know which of the several Linux
> distributions and which of the several Java VMs available for Linux
> you are using.  Also, how did you install Ant?  Which version?  Is
> there another version of Ant around (Fedora Core 2 and a bunch of
> other distros install an older version of Ant that may influence a
> hand-installed Ant badly)?
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 20 Sep 2004, Sarika Sahni <ss...@simdesk.com> wrote:

> I am new to Ant and am trying to compile some java sources on
> Linux. I have the ANT_HOME, JAVA_HOME and ANT_OPTS setup correctly
> on Linux machine but compiling the Java sources keeps giving me the
> error "Error starting modern compiler" followed by system out of
> resources: Java.land.outOfMemoryError.

Can you give us more details of your installation?

In particular we'd need to know which of the several Linux
distributions and which of the several Java VMs available for Linux
you are using.  Also, how did you install Ant?  Which version?  Is
there another version of Ant around (Fedora Core 2 and a bunch of
other distros install an older version of Ant that may influence a
hand-installed Ant badly)?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by Sarika Sahni <ss...@simdesk.com>.
Hi,

Thanks for your email. I am using 1.4.2_04-b05 Standard edition.
I can compile a simple java program using javac via command-line on linux.
The ant script does give the error though. :(

Thanks,
Sarika
----- Original Message ----- 
From: <bh...@freddiemac.com>
To: "Ant Users List" <us...@ant.apache.org>; "Sarika Sahni" 
<ss...@simdesk.com>
Sent: Monday, September 20, 2004 4:58 PM
Subject: Re: Error starting modern compiler


> Can you compile a simple java prog. in linux using javac on command line ?
> Also which JVM are you using ? (output of "java -version" ).
>
>
> Bhaskar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Error starting modern compiler

Posted by bh...@freddiemac.com.
Can you compile a simple java prog. in linux using javac on command line ?
Also which JVM are you using ? (output of "java -version" ).


Bhaskar 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org