On 7/2/06, Sanket Sharma <[EMAIL PROTECTED]> wrote:
Hi,
I downloaded the source file derby-10.1.2.1-src. While trying to build
the file, I get the following:

compile_types:
    [javac] Compiling 42 source files to C:\soc\db-derby-10.1.2.1-src\db-derby-1
0.1.2.1-src\classes
    [javac] C:\soc\db-derby-10.1.2.1-src\db-derby-10.1.2.1-src\java\engine\org\a
pache\derby\iapi\types\BigIntegerDecimal.java:459: cannot access java.lang.Strin
gBuilder
    [javac] file java\lang\StringBuilder.class not found
    [javac]                                             ("DECIMAL/NUMERIC("+desi
redPrecision+","+desiredScale+")"));
    [javac]
                                 ^

BUILD FAILED
C:\soc\db-derby-10.1.2.1-src\db-derby-10.1.2.1-src\build.xml:283: The following
error occurred while executing this line:
C:\soc\db-derby-10.1.2.1-src\db-derby-10.1.2.1-src\java\engine\build.xml:61: The
 following error occurred while executing this line:
C:\soc\db-derby-10.1.2.1-src\db-derby-10.1.2.1-src\java\engine\org\apache\derby\
iapi\build.xml:47: The following error occurred while executing this line:
C:\soc\db-derby-10.1.2.1-src\db-derby-10.1.2.1-src\java\engine\org\apache\derby\
iapi\types\build.xml:50: Compile failed; see the compiler error output for detai
ls.

Can anyone help??

It looks like you are running Ant in a 1.5 JVM. Ant uses the javac
compiler from the JDK that you are running for compilation. The 1.5
javac compiler uses the StringBuilder class to handle in-line String
concatenation, and the StringBuilder class is not present in the 1.4
class libraries. In 10.1, the class libraries used to compile all the
classes are all at the 1.4 or 1.3 level.

This has been fixed in 10.2 by adding source and target attributes to
all of the <javac> tasks in the build files. But for Derby versions
10.1 and earlier, the JDK that you use to run Ant must be a
1.4.2-level JDK.

hope that helps,
andrew

Reply via email to