[kaffe] problems with kaffe-1.1.2 + ant-1.5.4

Dalibor Topic robilad at kaffe.org
Thu Oct 30 09:51:02 PST 2003


Hola Juan,

Juan Antonio Martinez wrote:
> I'm trying to use kaffe jdk in my java developments, but found
> several problems when using ant to build projects:

thanks for your bug reports.

> 1- I need to invoke ant with "-Dbuild.compiler=extJavac" 
> option. Else doesn't ever run
> 
> optionally can use compiler="extJavac" in javac task to get it
> working. ¿Is this normal or a bug?

That's a problem in ant. Ant by default tries to load the class 
sun.something-weird-and-undocumented.Javac and ti run Sun's java 
compiler. Due to incompatible licenses (Sun's code is not GPL compatible 
open source) we can not ship Sun's compiler along with kaffe. We can not 
implement the class since it is an internal class from Sun and undocumented.

You can either set this setting forever in your ant configuration file 
(read the ant docs for that) or file a bug report to ant demanding that 
extJavac should be the default compiler, as that would work with more VMs.

BTW, you can also use build.compiler=kjc to load kjc in the same VM 
where ant is running, if you expect performance gains from that.

> 2- Take a look at these build.xml extract:
> [.......]
>    <target name="compile" depends="init"
>       description="Compile the java code">
>     <javac srcdir="${src}" destdir="${build}" compiler="extJavac">
>         <classpath refid="project.class.path"/>
>     </javac>
>     <!-- here comes some non-relevant items
>     .....
>     -->
>   </target>
> 
> [.....]
> when invoked "ant -v compile" just get this message:
> 
> --------------------------------------------
> [....]
> ga/javaxml/example/PersonExample.java
>     [javac]    
> /home/jantonio/public_html/almacen/cosas/skaringa/src/com/skaringa/javaxml/example/Person.java
>     [javac]    
> /home/jantonio/public_html/almacen/cosas/skaringa/src/com/skaringa/javaxml/example/OrgMember.java
>     [javac] Kjc: invalid option -- :

> What am i doing wrong?

You should give us the invocation line of kjc, too. Probably ant messes 
up an option for kjc, and doesn't use the proper option to call it. 
That's an issue that using build.compiler=kjc should solve.

cheers,
dalibor topic






More information about the kaffe mailing list