ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arion Yu <arion...@metrowalker.com>
Subject Problem on task javac
Date Fri, 26 Jul 2002 02:31:02 GMT
Hi everyone,

I use ant to build a project, and jar it up as a library:

<target name="main" depends="init">
<javac srcdir="src/"
destdir="classes/"
debug="on"
target="1.3">
<include name="com/metrowalker/mm/model/**/*.java" />
<classpath>
<pathelement location="${WL_HOME}/lib/log4j.jar" />
<pathelement location="${WL_HOME}/lib/weblogic.jar" />
</classpath>
</javac>
</target>

<target name="dist" depends="main">
<jar jarfile="mm-model-common.jar"
basedir="classes/" />
</target>

And later on, I execute the weblogic EJB Compiler to compile a EJB JAR

<java classname="weblogic.ejbc"
fork="yes"
jvm="${JAVA_HOME}/bin/java">
<arg line="-compiler javac mmCoupon.jar mmCoupon.weblogic.jar" />
<classpath>
<pathelement location="${WL_HOME}/lib/weblogic.jar" />
<pathelement location="${WL_HOME}/lib/log4j.jar" />
</classpath>
</java>

It gives the following error:

[java] error: Invalid class file format in /export/home/users/arion/mm-coup
on/ejbcgen/com/metrowalker/mm/model/ResourceAllocationException.class.
The majo
r.minor version '47.0' is too recent for this tool to understand.

The error gones if I explicitly compile the class with command line:
/usr/j2se/bin/javac -classpath
$WL_HOME/lib/log4j.jar:$WL_HOME/lib/weblogic.jar -d ../classes/
com/metrowalker/mm/model/ResourceAllocationException.java

Please suggest me some idea on this issue.

Thanks

More information:
mwalker1% java -version
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

mwalker1% echo $JAVA_HOME
/usr/j2se

mwalker1% $JAVA_HOME/bin/java -version
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

mwalker1% echo $ANT_HOME
/usr/local/jakarta-ant-1.5

mwalker1% ant -version
Apache Ant version 1.5 compiled on July 9 2002

mwalker1% cat ResourceAllocationException.java
package com.metrowalker.mm.model;

public class ResourceAllocationException extends Exception {
public ResourceAllocationException() {
super("not enough resource to allocate");
}

public ResourceAllocationException(String msg) {
super(msg);
}
}



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message