You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mamta Satoor <ms...@gmail.com> on 2008/08/29 20:45:40 UTC

Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Hi,

I am adding an import of java.util.concurrent.ThreadPoolExecutor in
org.apache.derby.iapi.sql.dictionary.DataDictionary and when I compile
it without any changes to build.xml, I ofcourse get errors for that
import because it is only available in jdk1.5 and higher.

In order to fix this, I have made changes to
org.apache.derby.iapi.sql.build.xml (attached to this mail) so that
DataDictionary is excluded from compile with jdk1.4 and will be
compiled with jdk1.6 But that is not fixing the problem. I was
wondering if someone more familiar with build.xml can help me on this?
This is my first time trying to add a new target and my attempt at
changes in this build.xml are based on other build.xmls in the Derby
engine code.

thanks,
Mamta
ps this is a temporary thing to put something jdk1.5 specific in
DataDictionary. I later plan subclass it and then jdk1.5 specific
stuff will go into that new class. But I will have to go through the
same exercise of changing build,xml for that new file and hence this
exercise of changing the build.xml will be useful later.

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Kathey Marsden <km...@sbcglobal.net>.
Mamta Satoor wrote:
> No, this is temporary. I plan on extending DataDictionary by
> subclassing it which will be loaded only when running with jdk 1.5 and
> higher. 
Thanks Mamta for the explanation.



Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
No, this is temporary. I plan on extending DataDictionary by
subclassing it which will be loaded only when running with jdk 1.5 and
higher. I am trying to break that task into mini-tasks by first making
changes directly to DataDictionary. This subtask will not be
committed. It is only for my local codeline. Once it works in my local
codeline, I will subclass DataDictionary to move jdk15 specific stuff
in that subclass.

Hope this answers your question, Kathey.

Mamta

On 9/2/08, Kathey Marsden <km...@sbcglobal.net> wrote:
> Mamta Satoor wrote:
> > I have made a very simple change to
> > iapi.sql.dictionary.DataDictionary.java which is to
> import
> > java.util.concurrent.ThreadPoolExecutor;
> >
> >
> >
>
> Will everything still run ok on jdk 1.4.2 if we do this?
>
> Thanks
>
> Kathey
>
>
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Kathey Marsden <km...@sbcglobal.net>.
Mamta Satoor wrote:
> I have made a very simple change to
> iapi.sql.dictionary.DataDictionary.java which is to import
> java.util.concurrent.ThreadPoolExecutor;
>
>   

Will everything still run ok on jdk 1.4.2 if we do this?

Thanks

Kathey



Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
Wanted to provide more info on the target which appears to be causing
DataDictionary to compile when I am not expecting it to happen.

Just to recap everything I have done/found so far

I have made a very simple change to
iapi.sql.dictionary.DataDictionary.java which is to import
java.util.concurrent.ThreadPoolExecutor;

This java.util.concurrent.ThreadPoolExecutor is only available in
jdk15 and higher. In order to make it compile with jdk15, I made
changes to C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\build.xml
(attached to this mail).

But for some reason, DataDictionary continues to compile with jdk14.
The odd thing is I see it getting compiled under a target that I
didn't expect it to be compiling. That target is in
C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\types\build.xml
It appears that compilation of iapi/types/SqlXmlUtil.java is causing
DataDictionary to compile although there is no reference to
DataDictionary in SqlXmlUtil. You can see that in the output of ant
-verbose all which is attached to this mail as dellater.txt.

I am unclear on why DataDictionary is getting compiled under the wrong
target. Will appreciate any help.

thanks,
Mamta

On 9/2/08, Mamta Satoor <ms...@gmail.com> wrote:
> Hi Kristian,
>
> I think that exactly is my problem. With my build.xml, when I compile
> with verbose
> ant -verbose all
> I see that DataDictionary is getting pulled in earlier than it's
> intended target. Although, the java class which is getting compiled
> right before DataDictionary does not have any reference to
> DataDictionary. Here is what I see when running with verbose
> compile_types:
>    [javac] org\apache\derby\iapi\types\SqlXmlUtil.java added as
> org/apache/derby/iapi/types/SqlXmlUtil.class doesn't exist.
>    [javac] Compiling 1 source file to
> C:\p4clients\svnmain\client1\trunk\classes
>    [javac] Using modern compiler
>    [javac] Compilation arguments:
>    [javac] '-nowarn'
>    [javac] '-deprecation'
>    [javac] '-d'
>    [javac] 'C:\p4clients\svnmain\client1\trunk\classes'
>    [javac] '-classpath'
>    [javac] 'C:\p4clients\svnmain\client1\trunk\classes;C:\p4clients\main\jdk142\jre\lib\charsets.jar;C:\p4clients\main\jdk142\jre\lib\jce.jar;C:\p4clients\main\jdk142\jre\lib\jsse.jar;C:\p4clients\main\jdk142\jre\lib\plugin.jar;C:\p4clients\main\jdk142\jre\lib\plugin_g.jar;C:\p4clients\main\jdk142\jre\lib\rt.jar;C:\p4clients\main\jdk142\jre\lib\sunrsasign.jar;C:\p4clients\svnmain\client1\trunk\tools\java\xercesImpl.jar'
>    [javac] '-sourcepath'
>    [javac] 'C:\p4clients\svnmain\client1\trunk\java\engine'
>    [javac] '-target'
>    [javac] '1.4'
>    [javac] '-bootclasspath'
>    [javac] 'C:\p4clients\svnmain\client1\trunk\classes\empty'
>    [javac] '-g'
>    [javac] '-source'
>    [javac] '1.4'
>    [javac]
>    [javac] The ' characters around the executable and arguments are
>    [javac] not part of the command.
>    [javac] File to be compiled:
>    [javac]
> C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\types\SqlXmlUtil.java
>    [javac] C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
> package java.util.concurrent does not exist
>    [javac] import java.util.concurrent.ThreadPoolExecutor;
>    [javac]                            ^
>    [javac] 1 error
>
> Attempts to compile DataDictionary happens multiple times (I assume
> because it is getting picked up because of other class dependencies on
> it) and everytime with same error.
>
> thanks Rick and Kristian for spending your time on this,
> Mamta
>
>
> On 9/2/08, Kristian Waagan <Kr...@sun.com> wrote:
> > On 09/02/08 08:26, Mamta Satoor wrote:
> > > Hi Rick,
> > >
> > > You are right, I did have typo in my build,xml file. I have fixed that
> > > and I think simplified the build,xml more than what I had last Friday
> > > but I still continue to get build errors about missing
> > > java.util.concurrent. package.
> > >
> >
> > Hi Mamta,
> >
> > I haven't looked into this, but earlier it has been a problem that when you
> > compile classes with a lower version of Java, the build system might pull in
> > dependencies (other classes) that require a higher version of Java. The
> > order of the build targets can be of importance in this case.
> >
> > Have you investigated if this can be what happens for you?
> > Can you identify under which build target the failure is happening?
> >
> >
> > regards,
> > --
> > Kristian
> >
> >
> > >
> > > The latest build.xml is attached.
> > >
> > > thanks,
> > > Mamta
> > >
> > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > >
> > > > Hi Mamta,
> > > >
> > > > One think that looks odd to me in the build.xml from your original post
> > is
> > > > this: you are exluding
> > > > ${derby.dir}/iapi/sql/DataDictionary.java. I think you
> > may
> > > > mean to exclude
> > > > ${derby.dir}/iapi/sql/dictionary/DataDictionary.java
> > > >
> > > >
> > > > Hope this helps,
> > > > -Rick
> > > >
> > > > Mamta Satoor wrote:
> > > >
> > > > >   [javac]
> > > > >
> > > >
> > C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
> > > >
> > > > > package java.util.concurrent does not exist
> > > > >   [javac] import
> > > > >
> > > > java.util.concurrent.ThreadPoolExecutor;
> > > >
> > > > >   [javac]                            ^
> > > > >   [javac] 1 error
> > > > >
> > > > > thanks,
> > > > > Mamta
> > > > >
> > > > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > > > >
> > > > >
> > > > >
> > > > > > Hi Mamta,
> > > > > >
> > > > > > What error are you seeing?
> > > > > >
> > > > > > -Rick
> > > > > >
> > > > > >
> > > > > > Mamta Satoor wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Thanks for your reply, Rick. I changed my build.xml as shown in
> > the
> > > > > > > attached file and still no luck yet :(
> > > > > > >
> > > > > > > Mamta
> > > > > > >
> > > > > > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > Hi Mamta,
> > > > > > > >
> > > > > > > > Here's a target from java/demo/build.xml which compiles some
> > classes
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > with
> > > > > >
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > > the 1.5 compiler. This may work better for you:
> > > > > > > >
> > > > > > > >  <target name="compile-vtidemo">
> > > > > > > >  <javac
> > > > > > > >  source="1.5"
> > > > > > > >  target="1.5"
> > > > > > > >  bootclasspath="${empty}"
> > > > > > > >  nowarn="on"
> > > > > > > >  debug="${debug}"
> > > > > > > >  depend="${depend}"
> > > > > > > >  deprecation="${deprecation}"
> > > > > > > >  optimize="${optimize}"
> > > > > > > >  proceed="${proceed}"
> > > > > > > >  verbose="${verbose}"
> > > > > > > >  srcdir="${derby.demo.src.dir}/vtis/java"
> > > > > > > >  destdir="${out.dir}">
> > > > > > > >  <classpath>
> > > > > > > >    <pathelement
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > path="${java15compile.classpath}"/>
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >  </classpath>
> > > > > > > >   <!-- <compilerarg value="-Xlint:unchecked"/> -->
> > > > > > > >  </javac>
> > > > > > > >  </target>
> > > > > > > >
> > > > > > > > Hope this helps,
> > > > > > > > -Rick
> > > > > > > >
> > > > > > > >
> > > > > > > > Mamta Satoor wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I am adding an import of
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > java.util.concurrent.ThreadPoolExecutor in
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > org.apache.derby.iapi.sql.dictionary.DataDictionary
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > and
> > > > > >
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > when I compile
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > it without any changes to build.xml, I ofcourse get errors for
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > that
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > import because it is only available in jdk1.5 and higher.
> > > > > > > > >
> > > > > > > > > In order to fix this, I have made changes to
> > > > > > > > > org.apache.derby.iapi.sql.build.xml (attached
> > to
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > this
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > mail) so that
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > > DataDictionary is excluded from compile with jdk1.4 and will
> > be
> > > > > > > > > compiled with jdk1.6 But that is not fixing the problem. I was
> > > > > > > > > wondering if someone more familiar with build.xml can help me
> > on
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > this?
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > This is my first time trying to add a new target and my
> > attempt at
> > > > > > > > > changes in this build.xml are based on other build.xmls in the
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > Derby
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > engine code.
> > > > > > > > >
> > > > > > > > > thanks,
> > > > > > > > > Mamta
> > > > > > > > > ps this is a temporary thing to put something jdk1.5 specific
> > in
> > > > > > > > > DataDictionary. I later plan subclass it and then jdk1.5
> > specific
> > > > > > > > > stuff will go into that new class. But I will have to go
> > through
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > the
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > same exercise of changing build,xml for that new file and
> > hence
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > this
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > > > exercise of changing the build.xml will be useful later.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
Hi Kristian,

I think that exactly is my problem. With my build.xml, when I compile
with verbose
ant -verbose all
I see that DataDictionary is getting pulled in earlier than it's
intended target. Although, the java class which is getting compiled
right before DataDictionary does not have any reference to
DataDictionary. Here is what I see when running with verbose
compile_types:
    [javac] org\apache\derby\iapi\types\SqlXmlUtil.java added as
org/apache/derby/iapi/types/SqlXmlUtil.class doesn't exist.
    [javac] Compiling 1 source file to
C:\p4clients\svnmain\client1\trunk\classes
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-nowarn'
    [javac] '-deprecation'
    [javac] '-d'
    [javac] 'C:\p4clients\svnmain\client1\trunk\classes'
    [javac] '-classpath'
    [javac] 'C:\p4clients\svnmain\client1\trunk\classes;C:\p4clients\main\jdk142\jre\lib\charsets.jar;C:\p4clients\main\jdk142\jre\lib\jce.jar;C:\p4clients\main\jdk142\jre\lib\jsse.jar;C:\p4clients\main\jdk142\jre\lib\plugin.jar;C:\p4clients\main\jdk142\jre\lib\plugin_g.jar;C:\p4clients\main\jdk142\jre\lib\rt.jar;C:\p4clients\main\jdk142\jre\lib\sunrsasign.jar;C:\p4clients\svnmain\client1\trunk\tools\java\xercesImpl.jar'
    [javac] '-sourcepath'
    [javac] 'C:\p4clients\svnmain\client1\trunk\java\engine'
    [javac] '-target'
    [javac] '1.4'
    [javac] '-bootclasspath'
    [javac] 'C:\p4clients\svnmain\client1\trunk\classes\empty'
    [javac] '-g'
    [javac] '-source'
    [javac] '1.4'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] File to be compiled:
    [javac]
C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\types\SqlXmlUtil.java
    [javac] C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
package java.util.concurrent does not exist
    [javac] import java.util.concurrent.ThreadPoolExecutor;
    [javac]                            ^
    [javac] 1 error

Attempts to compile DataDictionary happens multiple times (I assume
because it is getting picked up because of other class dependencies on
it) and everytime with same error.

thanks Rick and Kristian for spending your time on this,
Mamta


On 9/2/08, Kristian Waagan <Kr...@sun.com> wrote:
> On 09/02/08 08:26, Mamta Satoor wrote:
> > Hi Rick,
> >
> > You are right, I did have typo in my build,xml file. I have fixed that
> > and I think simplified the build,xml more than what I had last Friday
> > but I still continue to get build errors about missing
> > java.util.concurrent. package.
> >
>
> Hi Mamta,
>
> I haven't looked into this, but earlier it has been a problem that when you
> compile classes with a lower version of Java, the build system might pull in
> dependencies (other classes) that require a higher version of Java. The
> order of the build targets can be of importance in this case.
>
> Have you investigated if this can be what happens for you?
> Can you identify under which build target the failure is happening?
>
>
> regards,
> --
> Kristian
>
>
> >
> > The latest build.xml is attached.
> >
> > thanks,
> > Mamta
> >
> > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> >
> > > Hi Mamta,
> > >
> > > One think that looks odd to me in the build.xml from your original post
> is
> > > this: you are exluding
> > > ${derby.dir}/iapi/sql/DataDictionary.java. I think you
> may
> > > mean to exclude
> > > ${derby.dir}/iapi/sql/dictionary/DataDictionary.java
> > >
> > >
> > > Hope this helps,
> > > -Rick
> > >
> > > Mamta Satoor wrote:
> > >
> > > >   [javac]
> > > >
> > >
> C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
> > >
> > > > package java.util.concurrent does not exist
> > > >   [javac] import
> > > >
> > > java.util.concurrent.ThreadPoolExecutor;
> > >
> > > >   [javac]                            ^
> > > >   [javac] 1 error
> > > >
> > > > thanks,
> > > > Mamta
> > > >
> > > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > > >
> > > >
> > > >
> > > > > Hi Mamta,
> > > > >
> > > > > What error are you seeing?
> > > > >
> > > > > -Rick
> > > > >
> > > > >
> > > > > Mamta Satoor wrote:
> > > > >
> > > > >
> > > > >
> > > > > > Thanks for your reply, Rick. I changed my build.xml as shown in
> the
> > > > > > attached file and still no luck yet :(
> > > > > >
> > > > > > Mamta
> > > > > >
> > > > > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > > Hi Mamta,
> > > > > > >
> > > > > > > Here's a target from java/demo/build.xml which compiles some
> classes
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > with
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > > the 1.5 compiler. This may work better for you:
> > > > > > >
> > > > > > >  <target name="compile-vtidemo">
> > > > > > >  <javac
> > > > > > >  source="1.5"
> > > > > > >  target="1.5"
> > > > > > >  bootclasspath="${empty}"
> > > > > > >  nowarn="on"
> > > > > > >  debug="${debug}"
> > > > > > >  depend="${depend}"
> > > > > > >  deprecation="${deprecation}"
> > > > > > >  optimize="${optimize}"
> > > > > > >  proceed="${proceed}"
> > > > > > >  verbose="${verbose}"
> > > > > > >  srcdir="${derby.demo.src.dir}/vtis/java"
> > > > > > >  destdir="${out.dir}">
> > > > > > >  <classpath>
> > > > > > >    <pathelement
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > path="${java15compile.classpath}"/>
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >  </classpath>
> > > > > > >   <!-- <compilerarg value="-Xlint:unchecked"/> -->
> > > > > > >  </javac>
> > > > > > >  </target>
> > > > > > >
> > > > > > > Hope this helps,
> > > > > > > -Rick
> > > > > > >
> > > > > > >
> > > > > > > Mamta Satoor wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I am adding an import of
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > java.util.concurrent.ThreadPoolExecutor in
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > org.apache.derby.iapi.sql.dictionary.DataDictionary
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > and
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > when I compile
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > it without any changes to build.xml, I ofcourse get errors for
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > that
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > import because it is only available in jdk1.5 and higher.
> > > > > > > >
> > > > > > > > In order to fix this, I have made changes to
> > > > > > > > org.apache.derby.iapi.sql.build.xml (attached
> to
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > this
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > mail) so that
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > DataDictionary is excluded from compile with jdk1.4 and will
> be
> > > > > > > > compiled with jdk1.6 But that is not fixing the problem. I was
> > > > > > > > wondering if someone more familiar with build.xml can help me
> on
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > this?
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > This is my first time trying to add a new target and my
> attempt at
> > > > > > > > changes in this build.xml are based on other build.xmls in the
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > Derby
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > engine code.
> > > > > > > >
> > > > > > > > thanks,
> > > > > > > > Mamta
> > > > > > > > ps this is a temporary thing to put something jdk1.5 specific
> in
> > > > > > > > DataDictionary. I later plan subclass it and then jdk1.5
> specific
> > > > > > > > stuff will go into that new class. But I will have to go
> through
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > the
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > same exercise of changing build,xml for that new file and
> hence
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > this
> > >
> > > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > > exercise of changing the build.xml will be useful later.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Kristian Waagan <Kr...@Sun.COM>.
On 09/02/08 08:26, Mamta Satoor wrote:
> Hi Rick,
> 
> You are right, I did have typo in my build,xml file. I have fixed that
> and I think simplified the build,xml more than what I had last Friday
> but I still continue to get build errors about missing
> java.util.concurrent. package.

Hi Mamta,

I haven't looked into this, but earlier it has been a problem that when 
you compile classes with a lower version of Java, the build system might 
pull in dependencies (other classes) that require a higher version of 
Java. The order of the build targets can be of importance in this case.

Have you investigated if this can be what happens for you?
Can you identify under which build target the failure is happening?


regards,
-- 
Kristian

> 
> The latest build.xml is attached.
> 
> thanks,
> Mamta
> 
> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>> Hi Mamta,
>>
>> One think that looks odd to me in the build.xml from your original post is
>> this: you are exluding
>> ${derby.dir}/iapi/sql/DataDictionary.java. I think you may
>> mean to exclude
>> ${derby.dir}/iapi/sql/dictionary/DataDictionary.java
>>
>>
>> Hope this helps,
>> -Rick
>>
>> Mamta Satoor wrote:
>>>    [javac]
>> C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
>>> package java.util.concurrent does not exist
>>>    [javac] import
>> java.util.concurrent.ThreadPoolExecutor;
>>>    [javac]                            ^
>>>    [javac] 1 error
>>>
>>> thanks,
>>> Mamta
>>>
>>> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>>>
>>>
>>>> Hi Mamta,
>>>>
>>>> What error are you seeing?
>>>>
>>>> -Rick
>>>>
>>>>
>>>> Mamta Satoor wrote:
>>>>
>>>>
>>>>> Thanks for your reply, Rick. I changed my build.xml as shown in the
>>>>> attached file and still no luck yet :(
>>>>>
>>>>> Mamta
>>>>>
>>>>> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi Mamta,
>>>>>>
>>>>>> Here's a target from java/demo/build.xml which compiles some classes
>>>>>>
>>>>>>
>>>> with
>>>>
>>>>
>>>>>> the 1.5 compiler. This may work better for you:
>>>>>>
>>>>>>  <target name="compile-vtidemo">
>>>>>>  <javac
>>>>>>   source="1.5"
>>>>>>   target="1.5"
>>>>>>   bootclasspath="${empty}"
>>>>>>   nowarn="on"
>>>>>>   debug="${debug}"
>>>>>>   depend="${depend}"
>>>>>>   deprecation="${deprecation}"
>>>>>>   optimize="${optimize}"
>>>>>>   proceed="${proceed}"
>>>>>>   verbose="${verbose}"
>>>>>>   srcdir="${derby.demo.src.dir}/vtis/java"
>>>>>>   destdir="${out.dir}">
>>>>>>   <classpath>
>>>>>>     <pathelement
>> path="${java15compile.classpath}"/>
>>>>>>   </classpath>
>>>>>>    <!-- <compilerarg value="-Xlint:unchecked"/> -->
>>>>>>  </javac>
>>>>>>  </target>
>>>>>>
>>>>>> Hope this helps,
>>>>>> -Rick
>>>>>>
>>>>>>
>>>>>> Mamta Satoor wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I am adding an import of
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> java.util.concurrent.ThreadPoolExecutor in
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>> org.apache.derby.iapi.sql.dictionary.DataDictionary
>>>>>>>
>>>> and
>>>>
>>>>
>>>>>>>
>>>>>> when I compile
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> it without any changes to build.xml, I ofcourse get errors for
>> that
>>>>>>> import because it is only available in jdk1.5 and higher.
>>>>>>>
>>>>>>> In order to fix this, I have made changes to
>>>>>>> org.apache.derby.iapi.sql.build.xml (attached to
>> this
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> mail) so that
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> DataDictionary is excluded from compile with jdk1.4 and will be
>>>>>>> compiled with jdk1.6 But that is not fixing the problem. I was
>>>>>>> wondering if someone more familiar with build.xml can help me on
>> this?
>>>>>>> This is my first time trying to add a new target and my attempt at
>>>>>>> changes in this build.xml are based on other build.xmls in the
>> Derby
>>>>>>> engine code.
>>>>>>>
>>>>>>> thanks,
>>>>>>> Mamta
>>>>>>> ps this is a temporary thing to put something jdk1.5 specific in
>>>>>>> DataDictionary. I later plan subclass it and then jdk1.5 specific
>>>>>>> stuff will go into that new class. But I will have to go through
>> the
>>>>>>> same exercise of changing build,xml for that new file and hence
>> this
>>>>>>> exercise of changing the build.xml will be useful later.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>


Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
Hi Rick,

You are right, I did have typo in my build,xml file. I have fixed that
and I think simplified the build,xml more than what I had last Friday
but I still continue to get build errors about missing
java.util.concurrent. package.

The latest build.xml is attached.

thanks,
Mamta

On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> Hi Mamta,
>
> One think that looks odd to me in the build.xml from your original post is
> this: you are exluding
> ${derby.dir}/iapi/sql/DataDictionary.java. I think you may
> mean to exclude
> ${derby.dir}/iapi/sql/dictionary/DataDictionary.java
>
>
> Hope this helps,
> -Rick
>
> Mamta Satoor wrote:
> >    [javac]
> C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
> > package java.util.concurrent does not exist
> >    [javac] import
> java.util.concurrent.ThreadPoolExecutor;
> >    [javac]                            ^
> >    [javac] 1 error
> >
> > thanks,
> > Mamta
> >
> > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> >
> >
> > > Hi Mamta,
> > >
> > > What error are you seeing?
> > >
> > > -Rick
> > >
> > >
> > > Mamta Satoor wrote:
> > >
> > >
> > > > Thanks for your reply, Rick. I changed my build.xml as shown in the
> > > > attached file and still no luck yet :(
> > > >
> > > > Mamta
> > > >
> > > > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > > Hi Mamta,
> > > > >
> > > > > Here's a target from java/demo/build.xml which compiles some classes
> > > > >
> > > > >
> > > >
> > > with
> > >
> > >
> > > >
> > > > > the 1.5 compiler. This may work better for you:
> > > > >
> > > > >  <target name="compile-vtidemo">
> > > > >  <javac
> > > > >   source="1.5"
> > > > >   target="1.5"
> > > > >   bootclasspath="${empty}"
> > > > >   nowarn="on"
> > > > >   debug="${debug}"
> > > > >   depend="${depend}"
> > > > >   deprecation="${deprecation}"
> > > > >   optimize="${optimize}"
> > > > >   proceed="${proceed}"
> > > > >   verbose="${verbose}"
> > > > >   srcdir="${derby.demo.src.dir}/vtis/java"
> > > > >   destdir="${out.dir}">
> > > > >   <classpath>
> > > > >     <pathelement
> path="${java15compile.classpath}"/>
> > > > >   </classpath>
> > > > >    <!-- <compilerarg value="-Xlint:unchecked"/> -->
> > > > >  </javac>
> > > > >  </target>
> > > > >
> > > > > Hope this helps,
> > > > > -Rick
> > > > >
> > > > >
> > > > > Mamta Satoor wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I am adding an import of
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > java.util.concurrent.ThreadPoolExecutor in
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> org.apache.derby.iapi.sql.dictionary.DataDictionary
> > > > > >
> > > > > >
> > > > >
> > > >
> > > and
> > >
> > >
> > > >
> > > > >
> > > > > >
> > > > > >
> > > > > when I compile
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > it without any changes to build.xml, I ofcourse get errors for
> that
> > > > > > import because it is only available in jdk1.5 and higher.
> > > > > >
> > > > > > In order to fix this, I have made changes to
> > > > > > org.apache.derby.iapi.sql.build.xml (attached to
> this
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > mail) so that
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > DataDictionary is excluded from compile with jdk1.4 and will be
> > > > > > compiled with jdk1.6 But that is not fixing the problem. I was
> > > > > > wondering if someone more familiar with build.xml can help me on
> this?
> > > > > > This is my first time trying to add a new target and my attempt at
> > > > > > changes in this build.xml are based on other build.xmls in the
> Derby
> > > > > > engine code.
> > > > > >
> > > > > > thanks,
> > > > > > Mamta
> > > > > > ps this is a temporary thing to put something jdk1.5 specific in
> > > > > > DataDictionary. I later plan subclass it and then jdk1.5 specific
> > > > > > stuff will go into that new class. But I will have to go through
> the
> > > > > > same exercise of changing build,xml for that new file and hence
> this
> > > > > > exercise of changing the build.xml will be useful later.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Mamta,

One think that looks odd to me in the build.xml from your original post 
is this: you are exluding ${derby.dir}/iapi/sql/DataDictionary.java. I 
think you may mean to exclude 
${derby.dir}/iapi/sql/dictionary/DataDictionary.java

Hope this helps,
-Rick

Mamta Satoor wrote:
>     [javac] C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
> package java.util.concurrent does not exist
>     [javac] import java.util.concurrent.ThreadPoolExecutor;
>     [javac]                            ^
>     [javac] 1 error
>
> thanks,
> Mamta
>
> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>   
>> Hi Mamta,
>>
>> What error are you seeing?
>>
>> -Rick
>>
>>
>> Mamta Satoor wrote:
>>     
>>> Thanks for your reply, Rick. I changed my build.xml as shown in the
>>> attached file and still no luck yet :(
>>>
>>> Mamta
>>>
>>> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>>>
>>>
>>>       
>>>> Hi Mamta,
>>>>
>>>> Here's a target from java/demo/build.xml which compiles some classes
>>>>         
>> with
>>     
>>>> the 1.5 compiler. This may work better for you:
>>>>
>>>>  <target name="compile-vtidemo">
>>>>  <javac
>>>>    source="1.5"
>>>>    target="1.5"
>>>>    bootclasspath="${empty}"
>>>>    nowarn="on"
>>>>    debug="${debug}"
>>>>    depend="${depend}"
>>>>    deprecation="${deprecation}"
>>>>    optimize="${optimize}"
>>>>    proceed="${proceed}"
>>>>    verbose="${verbose}"
>>>>    srcdir="${derby.demo.src.dir}/vtis/java"
>>>>    destdir="${out.dir}">
>>>>    <classpath>
>>>>      <pathelement path="${java15compile.classpath}"/>
>>>>    </classpath>
>>>>     <!-- <compilerarg value="-Xlint:unchecked"/> -->
>>>>  </javac>
>>>>  </target>
>>>>
>>>> Hope this helps,
>>>> -Rick
>>>>
>>>>
>>>> Mamta Satoor wrote:
>>>>
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> I am adding an import of
>>>>>
>>>>>
>>>>>           
>>>> java.util.concurrent.ThreadPoolExecutor in
>>>>
>>>>
>>>>         
>>>>> org.apache.derby.iapi.sql.dictionary.DataDictionary
>>>>>           
>> and
>>     
>>>>>           
>>>> when I compile
>>>>
>>>>
>>>>         
>>>>> it without any changes to build.xml, I ofcourse get errors for that
>>>>> import because it is only available in jdk1.5 and higher.
>>>>>
>>>>> In order to fix this, I have made changes to
>>>>> org.apache.derby.iapi.sql.build.xml (attached to this
>>>>>
>>>>>
>>>>>           
>>>> mail) so that
>>>>
>>>>
>>>>         
>>>>> DataDictionary is excluded from compile with jdk1.4 and will be
>>>>> compiled with jdk1.6 But that is not fixing the problem. I was
>>>>> wondering if someone more familiar with build.xml can help me on this?
>>>>> This is my first time trying to add a new target and my attempt at
>>>>> changes in this build.xml are based on other build.xmls in the Derby
>>>>> engine code.
>>>>>
>>>>> thanks,
>>>>> Mamta
>>>>> ps this is a temporary thing to put something jdk1.5 specific in
>>>>> DataDictionary. I later plan subclass it and then jdk1.5 specific
>>>>> stuff will go into that new class. But I will have to go through the
>>>>> same exercise of changing build,xml for that new file and hence this
>>>>> exercise of changing the build.xml will be useful later.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>         
>>     


Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
    [javac] C:\p4clients\svnmain\client1\trunk\java\engine\org\apache\derby\iapi\sql\dictionary\DataDictionary.java:52:
package java.util.concurrent does not exist
    [javac] import java.util.concurrent.ThreadPoolExecutor;
    [javac]                            ^
    [javac] 1 error

thanks,
Mamta

On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> Hi Mamta,
>
> What error are you seeing?
>
> -Rick
>
>
> Mamta Satoor wrote:
> > Thanks for your reply, Rick. I changed my build.xml as shown in the
> > attached file and still no luck yet :(
> >
> > Mamta
> >
> > On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> >
> >
> > > Hi Mamta,
> > >
> > > Here's a target from java/demo/build.xml which compiles some classes
> with
> > > the 1.5 compiler. This may work better for you:
> > >
> > >  <target name="compile-vtidemo">
> > >  <javac
> > >    source="1.5"
> > >    target="1.5"
> > >    bootclasspath="${empty}"
> > >    nowarn="on"
> > >    debug="${debug}"
> > >    depend="${depend}"
> > >    deprecation="${deprecation}"
> > >    optimize="${optimize}"
> > >    proceed="${proceed}"
> > >    verbose="${verbose}"
> > >    srcdir="${derby.demo.src.dir}/vtis/java"
> > >    destdir="${out.dir}">
> > >    <classpath>
> > >      <pathelement path="${java15compile.classpath}"/>
> > >    </classpath>
> > >     <!-- <compilerarg value="-Xlint:unchecked"/> -->
> > >  </javac>
> > >  </target>
> > >
> > > Hope this helps,
> > > -Rick
> > >
> > >
> > > Mamta Satoor wrote:
> > >
> > >
> > > > Hi,
> > > >
> > > > I am adding an import of
> > > >
> > > >
> > > java.util.concurrent.ThreadPoolExecutor in
> > >
> > >
> > > > org.apache.derby.iapi.sql.dictionary.DataDictionary
> and
> > > >
> > > >
> > > when I compile
> > >
> > >
> > > > it without any changes to build.xml, I ofcourse get errors for that
> > > > import because it is only available in jdk1.5 and higher.
> > > >
> > > > In order to fix this, I have made changes to
> > > > org.apache.derby.iapi.sql.build.xml (attached to this
> > > >
> > > >
> > > mail) so that
> > >
> > >
> > > > DataDictionary is excluded from compile with jdk1.4 and will be
> > > > compiled with jdk1.6 But that is not fixing the problem. I was
> > > > wondering if someone more familiar with build.xml can help me on this?
> > > > This is my first time trying to add a new target and my attempt at
> > > > changes in this build.xml are based on other build.xmls in the Derby
> > > > engine code.
> > > >
> > > > thanks,
> > > > Mamta
> > > > ps this is a temporary thing to put something jdk1.5 specific in
> > > > DataDictionary. I later plan subclass it and then jdk1.5 specific
> > > > stuff will go into that new class. But I will have to go through the
> > > > same exercise of changing build,xml for that new file and hence this
> > > > exercise of changing the build.xml will be useful later.
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Mamta,

What error are you seeing?

-Rick

Mamta Satoor wrote:
> Thanks for your reply, Rick. I changed my build.xml as shown in the
> attached file and still no luck yet :(
>
> Mamta
>
> On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
>   
>> Hi Mamta,
>>
>> Here's a target from java/demo/build.xml which compiles some classes with
>> the 1.5 compiler. This may work better for you:
>>
>>  <target name="compile-vtidemo">
>>   <javac
>>     source="1.5"
>>     target="1.5"
>>     bootclasspath="${empty}"
>>     nowarn="on"
>>     debug="${debug}"
>>     depend="${depend}"
>>     deprecation="${deprecation}"
>>     optimize="${optimize}"
>>     proceed="${proceed}"
>>     verbose="${verbose}"
>>     srcdir="${derby.demo.src.dir}/vtis/java"
>>     destdir="${out.dir}">
>>     <classpath>
>>       <pathelement path="${java15compile.classpath}"/>
>>     </classpath>
>>      <!-- <compilerarg value="-Xlint:unchecked"/> -->
>>   </javac>
>>  </target>
>>
>> Hope this helps,
>> -Rick
>>
>>
>> Mamta Satoor wrote:
>>     
>>> Hi,
>>>
>>> I am adding an import of
>>>       
>> java.util.concurrent.ThreadPoolExecutor in
>>     
>>> org.apache.derby.iapi.sql.dictionary.DataDictionary and
>>>       
>> when I compile
>>     
>>> it without any changes to build.xml, I ofcourse get errors for that
>>> import because it is only available in jdk1.5 and higher.
>>>
>>> In order to fix this, I have made changes to
>>> org.apache.derby.iapi.sql.build.xml (attached to this
>>>       
>> mail) so that
>>     
>>> DataDictionary is excluded from compile with jdk1.4 and will be
>>> compiled with jdk1.6 But that is not fixing the problem. I was
>>> wondering if someone more familiar with build.xml can help me on this?
>>> This is my first time trying to add a new target and my attempt at
>>> changes in this build.xml are based on other build.xmls in the Derby
>>> engine code.
>>>
>>> thanks,
>>> Mamta
>>> ps this is a temporary thing to put something jdk1.5 specific in
>>> DataDictionary. I later plan subclass it and then jdk1.5 specific
>>> stuff will go into that new class. But I will have to go through the
>>> same exercise of changing build,xml for that new file and hence this
>>> exercise of changing the build.xml will be useful later.
>>>
>>>
>>>       
>>     


Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Mamta Satoor <ms...@gmail.com>.
Thanks for your reply, Rick. I changed my build.xml as shown in the
attached file and still no luck yet :(

Mamta

On 8/29/08, Rick Hillegas <Ri...@sun.com> wrote:
> Hi Mamta,
>
> Here's a target from java/demo/build.xml which compiles some classes with
> the 1.5 compiler. This may work better for you:
>
>  <target name="compile-vtidemo">
>   <javac
>     source="1.5"
>     target="1.5"
>     bootclasspath="${empty}"
>     nowarn="on"
>     debug="${debug}"
>     depend="${depend}"
>     deprecation="${deprecation}"
>     optimize="${optimize}"
>     proceed="${proceed}"
>     verbose="${verbose}"
>     srcdir="${derby.demo.src.dir}/vtis/java"
>     destdir="${out.dir}">
>     <classpath>
>       <pathelement path="${java15compile.classpath}"/>
>     </classpath>
>      <!-- <compilerarg value="-Xlint:unchecked"/> -->
>   </javac>
>  </target>
>
> Hope this helps,
> -Rick
>
>
> Mamta Satoor wrote:
> > Hi,
> >
> > I am adding an import of
> java.util.concurrent.ThreadPoolExecutor in
> > org.apache.derby.iapi.sql.dictionary.DataDictionary and
> when I compile
> > it without any changes to build.xml, I ofcourse get errors for that
> > import because it is only available in jdk1.5 and higher.
> >
> > In order to fix this, I have made changes to
> > org.apache.derby.iapi.sql.build.xml (attached to this
> mail) so that
> > DataDictionary is excluded from compile with jdk1.4 and will be
> > compiled with jdk1.6 But that is not fixing the problem. I was
> > wondering if someone more familiar with build.xml can help me on this?
> > This is my first time trying to add a new target and my attempt at
> > changes in this build.xml are based on other build.xmls in the Derby
> > engine code.
> >
> > thanks,
> > Mamta
> > ps this is a temporary thing to put something jdk1.5 specific in
> > DataDictionary. I later plan subclass it and then jdk1.5 specific
> > stuff will go into that new class. But I will have to go through the
> > same exercise of changing build,xml for that new file and hence this
> > exercise of changing the build.xml will be useful later.
> >
> >
>
>

Re: Help with build.xml so that DataDictionary class will compile with jdk1.5 and higher...

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Mamta,

Here's a target from java/demo/build.xml which compiles some classes 
with the 1.5 compiler. This may work better for you:

  <target name="compile-vtidemo">
    <javac
      source="1.5"
      target="1.5"
      bootclasspath="${empty}"
      nowarn="on"
      debug="${debug}"
      depend="${depend}"
      deprecation="${deprecation}"
      optimize="${optimize}"
      proceed="${proceed}"
      verbose="${verbose}"
      srcdir="${derby.demo.src.dir}/vtis/java"
      destdir="${out.dir}">
      <classpath>
        <pathelement path="${java15compile.classpath}"/>
      </classpath>
       <!-- <compilerarg value="-Xlint:unchecked"/> -->
    </javac>
  </target>

Hope this helps,
-Rick

Mamta Satoor wrote:
> Hi,
>
> I am adding an import of java.util.concurrent.ThreadPoolExecutor in
> org.apache.derby.iapi.sql.dictionary.DataDictionary and when I compile
> it without any changes to build.xml, I ofcourse get errors for that
> import because it is only available in jdk1.5 and higher.
>
> In order to fix this, I have made changes to
> org.apache.derby.iapi.sql.build.xml (attached to this mail) so that
> DataDictionary is excluded from compile with jdk1.4 and will be
> compiled with jdk1.6 But that is not fixing the problem. I was
> wondering if someone more familiar with build.xml can help me on this?
> This is my first time trying to add a new target and my attempt at
> changes in this build.xml are based on other build.xmls in the Derby
> engine code.
>
> thanks,
> Mamta
> ps this is a temporary thing to put something jdk1.5 specific in
> DataDictionary. I later plan subclass it and then jdk1.5 specific
> stuff will go into that new class. But I will have to go through the
> same exercise of changing build,xml for that new file and hence this
> exercise of changing the build.xml will be useful later.
>