harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@apache.org>
Subject ECJ and Harmony
Date Tue, 22 May 2007 15:54:35 GMT
Hello

While investigating the bug described in HARMONY-3565 I found out that 
ECJ (eclipse compiler that we use for java compilation) doesn't work 
quite correctly with Harmony. It tries to guess boot classes looking for 
files for ${java.home}/lib/*.jar files.

This works for Sun, but doesn't work for Harmony because we have our 
boot classes in ${java.home/bin/default/*.jar, 
${java.home/lib/boot/*.jar and ${java.home}/lib/boot/*/*.jar files. ECJ 
doesn't find them and so running ECJ from the command line as

<path to HDK>/jre/bin/java -jar ecj.jar <java source file>

produces and error that j.l.Object and other core classes cannot be 
resolved. The bug is reproducible both on DRLVM and IBM VME. When 
passing -bootclasspath or -classpath switches to ECJ explicitly, it 
finds boot classes just fine (this is how it is done in our javac 
launcher, it passes -classpath switch with value of 
org.apache.harmony.boot.class.path property to 
org.eclipse.jdt.internal.compiler.batch.Main class).

I don't have a quick solution on how to fix the bug. Tuning ECJ to make 
it understand Harmony's JAR files layout doesn't seem to be a good idea 
because the actual JAR files are specified in lib/bootclasspath.properties.

We could also ask Eclipse developers to make ECJ understand 
org.apache.harmony.boot.class.path property, what do you think?

-- 
Gregory


Mime
View raw message