[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.newcomer] Re: ANT - specify what version of java to use
|
You will need to make use of the source and target attributes of the Ant
javac task.
See
http://ant.apache.org/manual/CoreTasks/javac.html
HTH
Darins
"Chris Gates" <chrisg@xxxxxxxxxxxxxxx> wrote in message
news:dv8tom$qpi$1@xxxxxxxxxxxxxxxxxxxx
> I've got some java projects set up in Eclipse. These projects must be
built
> using Java 1.3, as they are running on a device that is limited to this
JVM
> version.
> I have tried a numbe rof combinations of using different jdks and
different
> JAVA_HOME variables.
>
> I can get Eclipse to build to 1.3 by setting the jdk to be used under the
> workspace settings, however i cannot translate this to the ant build
> scripts.
>
> If i leave the eclipse jdk to 1.4, then the ant build works fine, but when
i
> try to run the created jar on the intended device, i get a
> java.lang.NoClassDefFoundError: java/lang/StringBuilder error.
>
> (TO my knowledge, i thought String Builder was implementeed in 1.5 not
1.4,
> so i dont know how this is happening!)
>
> So i tried switching the jdk in eclipse back to 1.3, and then running the
> ant build - when doing this, the build doesnt happen, as it complains
about
> there not being a XML parser.
>
> I tried having the eclipse jdk set to 1.4, and setting my JAVA_HOME
variable
> to the 1.3 jdk, but this creates the StringBuilder errors on the device as
> before!
>
> Can anyone explain to me how i might get this working?
>
> Cheers
>
> Chris
>
>
>