Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 1771 invoked from network); 11 Dec 2006 19:49:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2006 19:49:28 -0000 Received: (qmail 25201 invoked by uid 500); 11 Dec 2006 19:49:31 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 25173 invoked by uid 500); 11 Dec 2006 19:49:31 -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 25162 invoked by uid 99); 11 Dec 2006 19:49:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 11:49:31 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [207.69.200.58] (HELO pop05.mail.atl.earthlink.net) (207.69.200.58) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 11:49:20 -0800 Received: from nc-76-3-203-144.dhcp.embarqhsd.net ([76.3.203.144] helo=flossware.homelinux.org) by pop05.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1Gtr8z-0003B4-00; Mon, 11 Dec 2006 14:48:58 -0500 Received: from [192.168.168.1] (unknown [192.168.168.1]) by flossware.homelinux.org (Postfix) with ESMTP id 72DAB1D0720; Mon, 11 Dec 2006 14:48:56 -0500 (EST) Message-ID: <457DB627.2010107@mindspring.com> Date: Mon, 11 Dec 2006 14:48:55 -0500 From: "Scot P. Floess" Reply-To: floess@mindspring.com User-Agent: Thunderbird 1.5.0.8 (X11/20061025) MIME-Version: 1.0 To: glenn opdycke-hansen CC: Ant Users List Subject: Re: ant javac version question References: <457D99F7.6040909@mindspring.com> <457DA21D.1000301@mindspring.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org You can certainly specify which JDK to use in the task. However, that may not fix your runtime issue...if an older version of the JDK is used to run against it... Yes, specifying may help... Again, you need to ensure the VM being used when running against the compiled class is the correct version (in your case I think that means a 1.4.2+ VM)... It looks to me like your code is being compiled using the JDK 1.5.0+ I just compiled some code and did a "javap -c -verbose" on a class file... With the JDK 1.5.0_09 I get a minor = 0 major = 49... Compiling wiht "javac -source 1.2 release 1.2" I see the minor = 0 major = 46. My guess is the JDK being used during compilation is 1.5.0+. As such, try doing the target = "1.4" ... You may also need to set source = "1.4" HTH, Scot glenn opdycke-hansen wrote: > Right, I know that jdk 1.4.2 works. > I suspect that some other jdk version is creeping into the class/jar > file. > I specified JAVA_HOME for the 1.4.2 jdk. I also suggested to the > developer to change the path. (I heard that that did not work) > java -version also states that 1.4.2 will be used. > > Is there some option/parm on the javac that will help with this? > Perhaps ? > Perhaps ? > --glenn > > On 12/11/06, Scot P. Floess wrote: >> Well there is your problem...the JVM you are trying to use to run (not >> compile) does not support the version that was compiled. >> Meaning...let's say you compiled using the JDK 1.5 but attempted to run >> using the JDK 1.2.2 - you'd get the error listed. >> >> Somehow you are compiling with a newer JDK but when running, you are >> getting some older version of the JDK. >> >> Make sure your path is correct and include this newer JDK... You might >> want to put $JAVA_HOME/bin first in your path. Or, on the command line >> type: >> >> java -version >> >> Either way its a JVM mismatch problem. >> >> glenn opdycke-hansen wrote: >> > Replies below. >> > >> > On 12/11/06, Scot P. Floess wrote: >> >> What type of exceptions are you getting? >> > >> > java.lang.Exception: Error in >> > [ProcessDefinitions/Shared/Logging/MaskLogData.process/MaskPayload] >> > BW-JAVA-100030 Unable to obtain information for method >> > [maskElementsInPayload] from the class >> > [com.usbank.entdevsvc.mask.MaskPayload]. Exception occurred. >> > java.lang.UnsupportedClassVersionError: >> > com/usbank/entdevsvc/mask/MaskPayload (Unsupported major.minor version >> > 49.0) >> > >> >> >> >> If you use the class file outside the jar file...does that work? >> > >> > We have not tried that (yet). >> > >> >> >> >> Is your harddrive full? >> > >> > no >> > >> >> >> >> glenn opdycke-hansen wrote: >> >> > We are seeing that the javac can produce an unusable .class file. >> >> > One PC will build the java source OK, but the other PC does >> not. The >> >> > resulting JAR file has a different size and there are exceptions >> when >> >> > the other jar is used. >> >> > We set JAVA_HOME to the jdk (1.4.2_13) on both PCs. >> >> > >> >> > Has anyone seen this? >> >> > Could it be due to differences in the PATH (winxp)? >> >> > Is there any way to check the version of the jdk/javac used? >> (-verbose >> >> > does not seem to provide enough info) >> >> > >> >> > Thanks, >> >> > --glenn >> >> > >> >> > >> --------------------------------------------------------------------- >> >> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> >> > For additional commands, e-mail: user-help@ant.apache.org >> >> > >> >> > >> >> >> >> -- >> >> Scot P. Floess >> >> 27 Lake Royale >> >> Louisburg, NC 27549 >> >> >> >> 252-478-8087 (Home) >> >> 919-754-4592 (Work) >> >> >> >> Chief Architect JPlate http://sourceforge.net/projects/jplate >> >> Chief Architect JavaPIM http://sourceforge.net/projects/javapim >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> >> For additional commands, e-mail: user-help@ant.apache.org >> >> >> >> >> > >> >> -- >> Scot P. Floess >> 27 Lake Royale >> Louisburg, NC 27549 >> >> 252-478-8087 (Home) >> 919-754-4592 (Work) >> >> Chief Architect JPlate http://sourceforge.net/projects/jplate >> Chief Architect JavaPIM http://sourceforge.net/projects/javapim >> >> > -- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org