ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: Getting Ant to compile to a different VM?
Date Wed, 03 Jan 2007 13:45:44 GMT
It sounds like an environment issue...  Regarding the class version 
error...I think you are correct - it is compiled to 1.3 however, for 
some reason, the 1.3 VM is attempting to use the 1.5 version of the Java 
classes.  You may need to install a 1.3 version of the JDK and "tell" 
Eclipse to use that.  Again, I am not an Eclipse user so I don't have 
any "words of wisdom" with respect to Eclipse.

m1ke wrote:
> Hiya, at that point -- the ant builder run time preferences has a 'global
> entries' section which contains tools.jar for jdk 1.5. If I replace it with
> 1.3 it comes up with those errors (as its still looking for other libraries
> in 1.5 folder so there's a mix of java versions). Not sure how to change the
> others or get it to stop looking there. However, if I keep the same 1.5
> tools.jar the program compiles with a warning:
>
> 94: warning: non-varargs call of varargs method with inexact argument type
> for last parameter;
>        [javac] cast to java.lang.Object for a varargs call
>        [javac] cast to java.lang.Object[] for a non-varargs call and to
> suppress this warning
>        [javac]                   dbid = (String) m.invoke(cl, null);
>        [javac]                                                ^
>        [javac] Note: Some input files use or override a deprecated API.
>        [javac] Note: Recompile with -Xlint:deprecation for details.
>        [javac] Note: Some input files use unchecked or unsafe operations.
>        [javac] Note: Recompile with -Xlint:unchecked for details.
>        [javac] 1 warning
>
> So basically its compiling to 1.5 instead of 1.3.
>
>
> Scot P. Floess wrote:
>   
>> OK I found your original email...  It looks like you have a number of 
>> problems...  When you get that exception (class version) what is it you 
>> are doing at that time?  That doesn't look to me to be a compile time 
>> exception...
>>
>> Scot P. Floess wrote:
>>     
>>> I believe its simply:  <javac target="1.3"/>
>>>
>>> You may also have to specify using the attribute source="1.3"
>>>
>>> When you say "it's still having the problem" - can you refresh my 
>>> memory - what is the problem exactly?  I deleted my emails :(
>>>
>>>
>>> m1ke wrote:
>>>       
>>>> Hi ,thanks for the reply. Yeah there is a build.xml, previously tried 
>>>> putting
>>>> a < target="1.3"> tag in a javac area of the build.xml... perhaps it

>>>> wasnt
>>>> entered correctly as it's still having the problem. Will try again.. 
>>>> what is
>>>> the best way to do go about it? (just double-checking entered it 
>>>> correctly)
>>>>
>>>>
>>>> Scot P. Floess wrote:
>>>>  
>>>>         
>>>>> If you need to compile targeted to JDK 1.3, you will need to set 
>>>>> your <javac target="1.3">...  I am not an Eclipse user so I can't

>>>>> help you there...  I'm guessing an Ant build.xml is generated that 
>>>>> you can edit?
>>>>>
>>>>>     
>>>>>           
>>>>   
>>>>         
>> -- 
>> 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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message