A
Andreas Leitgeb
For some project to build, some external tools are needed, which
refuse to work with a java newer than 1.4.*. But for the rest of
all tasks, we'd like to upgrade to use a newer java and/or javac.
How can I tell ant to use a separate "java"-binary given with
full path (using separate env-var) just for some task?
I've already googled, but only found hints towards "-target"
which is good for the compiler, but not for an external java-task,
and questions on how to run "ant" (and everything else) with a
different (than default) jvm. Also, I haven't found any options
that would make java mimick/pretend an older version.
PS: theoretically a newer jvm should always execute old class files
correctly, unless the (closed-source) class files have an explicit
check on the version and refuse to run with too new a version.
PPS: the problematic task is sqlj.tools.Sqlj and it fails with:
"Fehler: Für diese JDBC-Library ist JDK 1.4 erforderlich."
(rough translation: "For this JDBC-lib, jdk 1.4 is necessary")
when I run ant with a JAVA_HOME pointing to a newer java&javac.
PPPS: I've written java in lowercase, because I refer to the
such named program, or to a such-named ant-tag, not to the
platform Java itself.
refuse to work with a java newer than 1.4.*. But for the rest of
all tasks, we'd like to upgrade to use a newer java and/or javac.
How can I tell ant to use a separate "java"-binary given with
full path (using separate env-var) just for some task?
I've already googled, but only found hints towards "-target"
which is good for the compiler, but not for an external java-task,
and questions on how to run "ant" (and everything else) with a
different (than default) jvm. Also, I haven't found any options
that would make java mimick/pretend an older version.
PS: theoretically a newer jvm should always execute old class files
correctly, unless the (closed-source) class files have an explicit
check on the version and refuse to run with too new a version.
PPS: the problematic task is sqlj.tools.Sqlj and it fails with:
"Fehler: Für diese JDBC-Library ist JDK 1.4 erforderlich."
(rough translation: "For this JDBC-lib, jdk 1.4 is necessary")
when I run ant with a JAVA_HOME pointing to a newer java&javac.
PPPS: I've written java in lowercase, because I refer to the
such named program, or to a such-named ant-tag, not to the
platform Java itself.