Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 41786 invoked from network); 29 Sep 2006 20:00:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2006 20:00:53 -0000 Received: (qmail 27309 invoked by uid 500); 29 Sep 2006 20:00:35 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 27245 invoked by uid 500); 29 Sep 2006 20:00:35 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 27179 invoked by uid 99); 29 Sep 2006 20:00:35 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2006 13:00:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [194.25.134.83] ([194.25.134.83:35922] helo=mailout07.sul.t-online.com) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 71/9C-13110-C3B7D154 for ; Fri, 29 Sep 2006 13:00:14 -0700 Received: from fwd35.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1GTOUZ-0006ID-03; Fri, 29 Sep 2006 21:57:51 +0200 Received: from [84.156.254.188] (rXFN+uZCQef1bF+WlwAzVG2xL+-xtjYCOTfScrJroDcf2PTEeS5ew+@[84.156.254.188]) by fwd35.sul.t-online.de with esmtp id 1GTOUO-0qFI800; Fri, 29 Sep 2006 21:57:40 +0200 Message-ID: <451D7A1D.6050109@T-Online.de> Date: Fri, 29 Sep 2006 21:55:09 +0200 From: milosz.muszynski@t-online.de (Milosz Muszynski) User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Ant Users List Subject: Re: ant and eclipse? References: <973858C2ADFF5C4F99415784F9391C0601C077C1@glgexchange04.glgroup.com> In-Reply-To: <973858C2ADFF5C4F99415784F9391C0601C077C1@glgexchange04.glgroup.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: rXFN+uZCQef1bF+WlwAzVG2xL+-xtjYCOTfScrJroDcf2PTEeS5ew+ X-TOI-MSGID: cbb99aba-17f3-48a9-9713-190e89b078e9 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I think the problem is not in JVMs incompatibility but in the fact that Eclipse uses its own Java compiler which is not the same as the one run by Ant (or outside Eclipse in general). I am not sure what the incompatibility between .class files is, but we experience it as well. I would suggest switching Eclipse to use external compiler, in order to eliminate the difference. I don't think massaging compiler options will help here. Or maybe even better - simply refrain from using the mixed output (this is what we do). Either compile everything with Eclipse or with Ant would be my advice. Milosz Mark Modrall wrote: > I found the Java Compiler section of the Properties dialog, but as I say > it doesn't help clarify why the .class files it produces are > incompatible with the jdk javac ones. > > Our eclipse project has > Compiler compliance level: 5.0 > Use default compliance settings > > Classfile generation: > Add variable attributes to generated class files > Add line number attributes to generated classfiles > Add source file name to generated class file > Preserve unused local variables > > Our ant task ends up using > Jdk1.5.0_06\javac -deprecation -d -g *.java > > As I say, the net result is that the eclipse .class files won't work > with the javac ones but I'm at a loss to figure out which options are > creating the incompatibility. > > Thanks > -mark > > > > > This e-mail message, and any attachments, is intended only for the use of the individual or entity identified in the alias address of this message and may contain information that is confidential, privileged and subject to legal restrictions and penalties regarding its unauthorized disclosure and use. Any unauthorized review, copying, disclosure, use or distribution is strictly prohibited. If you have received this e-mail message in error, please notify the sender immediately by reply e-mail and delete this message, and any attachments, from your system. Thank you. > > -----Original Message----- > > From: Shay Thompson [mailto:sthompso@adobe.com] > Sent: Friday, September 29, 2006 3:16 PM > To: Ant Users List > Subject: Re: ant and eclipse? > > > Each Java Project in Eclipse has a JVM assigned to the project. If you > right-click the project name and select properties you can find it in > there. > > Mark Modrall wrote: > >> Not sure where I'd check that. I know that ant is using jdk1.5.0.6 >> > but > >> I don't know how to look into what eclipse is using... >> >> Thanks >> -mark >> >> >> >> >> >> This e-mail message, and any attachments, is intended only for the use >> > of the individual or entity identified in the alias address of this > message and may contain information that is confidential, privileged and > subject to legal restrictions and penalties regarding its unauthorized > disclosure and use. Any unauthorized review, copying, disclosure, use or > distribution is strictly prohibited. If you have received this e-mail > message in error, please notify the sender immediately by reply e-mail > and delete this message, and any attachments, from your system. Thank > you. > >> -----Original Message----- >> >> From: Shay Thompson [mailto:sthompso@adobe.com] >> Sent: Friday, September 29, 2006 2:53 PM >> To: Ant Users List >> Subject: Re: ant and eclipse? >> >> >> The first thing I'd look at is what JVM is Eclipse using to compile >> > the > >> code vs. what JVM is used when on the command-line. >> >> -Shay >> >> Mark Modrall wrote: >> >> >>> Hi... >>> >>> >>> >>> We do all of our development in eclipse and use ant 1.6.5 >>> for our nightly builds on another machine. But someone just tried to >>> invoke ant to run our junit tests on his dev machine. He went into >>> >>> >> the >> >> >>> eclipse project directory and executed the ant build.xml file there, >>> >>> >> but >> >> >>> the javac task on the junit tests failed with a strange compile error >>> against one of the base classes to be tested (a "bad class file" >>> > error > >>> on the use of generics). >>> >>> >>> >>> Finally narrowed it down to the fact that the .class >>> > files > >>> produced by eclipse aren't compatible with the class files produced >>> > by > >>> . If I recompile the base classes from the command line using >>> javac, then the junit test compiles. The problem is that it's hard >>> > to > >>> map what options eclipse is using to javac commandline parameters, so >>> >>> >> I >> >> >>> can't tell what is causing the incompatibility. >>> >>> >>> >>> Eclipse has a Run As... option for ant projects but when >>> > I > >>> try to run it from inside eclipse, it says it doesn't know about >>> . >>> >>> >>> >>> First, anyone know how to tell what the two compilers >>> >>> >> don't >> >> >>> like about each other? And second, how does one get eclipse to run >>> >>> >> ant >> >> >>> builds? >>> >>> >>> >>> Thanks >>> >>> -Mark >>> >>> >>> This e-mail message, and any attachments, is intended only for the >>> > use > >>> >>> >> of the individual or entity identified in the alias address of this >> message and may contain information that is confidential, privileged >> > and > >> subject to legal restrictions and penalties regarding its unauthorized >> disclosure and use. Any unauthorized review, copying, disclosure, use >> > or > >> distribution is strictly prohibited. If you have received this e-mail >> message in error, please notify the sender immediately by reply e-mail >> and delete this message, and any attachments, from your system. Thank >> you. >> >> >>> >>> >>> >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org