On Mar 25, 2013, at 5:28 PM, Lance Andersen <lance.ander...@oracle.com> wrote:

> Hi Joe,
> 
> On Mar 25, 2013, at 5:12 PM, huizhe wang <huizhe.w...@oracle.com> wrote:
> 
>> Hi Lance,
>> 
>> Are you setting it up as a free-form project?  In a free-form project, the 
>> custom build script is separate from those generated by the IDE.  Although 
>> you can map targets from the custom build script to project actions, you 
>> won't see properties such as source in the script reflected in the IDE. Your 
>> ide may be configured so that you may right-click and compile selected file 
>> using IDE generated scripts, but when you 'build' the whole project, you're 
>> using the target in your customer script.  In this case, your build script 
>> must have defined to compile to source 1.5 that seems to be in the 
>> shared.xml.
> 
> Yes, I was looking at shared.xml and it has the following
> 
> <macrodef name="jdk-javac">
>            <attribute name="srcdir"/>
>            <attribute name="includes" default="${includes}"/>
>            <attribute name="excludes" default="${excludes}"/>
>            <attribute name="classesdir" default="${classes.dir}"/>
>            <sequential>
>                <mkdir dir="@{classesdir}"/>
>                <javac srcdir="@{srcdir}" includes="@{includes}" 
> excludes="@{excludes}" sourcepath="" 
>                    destdir="@{classesdir}" fork="true" 
> executable="${bootstrap.javac}"
>                    debug="${javac.debug}" debuglevel="${javac.debuglevel}">
>                    <compilerarg value="-source"/>
>                    <compilerarg value="1.5"/>
>                    <compilerarg value="-target"/>
>                    <compilerarg value="1.6"/> <!-- for usability of JDK 6 as 
> snapshot; change to 1.7 when JSR 294 put back -->
>                    <!-- Mandatory for compiling partial JDK sources against a 
> snapshot; should NEVER be used for any other purpose: -->
>                    <compilerarg value="-XDignore.symbol.file=true"/>
>                    <compilerarg line="${javac.options}"/>
>                </javac>
> 
> 
> So this seems to be the issue.
> 
> So I changed the values above just now from  1.5 and 1.6 to both be 1.7
> 
> Which worked much better.
> 
> 
> This works in a jdk7 repository.
> 
> It looks like shared.xml was changed for jdk8  so it does not have the values 
> above.
> 
> 
> Also, do you know why if this is on osx  it is building in
> 
> Copying 3 files to 
> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/build/windows-x86_64/classes
> Building jar: 
> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/dist/lib/jdb42.jar
> 


This appears due to the following error which you see with verbose on for ant

Unable to find property file: 
/Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/common/architectures/name-Mac
 OS X.properties

The actual file name the jdk  make/netbeans/architectures  is 
name-Macosx.properties

The culprit seems to be the -project-init target in shared.xml

<target name="-project-init" depends="-warn-about-bootstrap.jdk">
        <property name="root" location="../../.."/>
        <property file="../common/architectures/name-${os.name}.properties"/>
        <property name="platform" value="windows"/>
        <property file="../common/architectures/arch-${os.arch}.properties"/>
        <property name="arch" value="${os.arch}"/>

Now perhaps this is a difference between OSX versions?  I will have to try on 
my work machine as this is my home system which is Mountain Lion and my work is 
Snow Leopard 



Best
Lance
> 
> Thank you for your time Joe
> 
> Best
> Lance
>> -Joe
>> 
>> On 3/25/2013 1:25 PM, Lance Andersen wrote:
>>> Hi all,
>>> 
>>> I am trying to set up a netbeans project for JDBC within openjdk leveraging 
>>> the existing projects that are already in jdk/make/netbeans
>>> 
>>> I have getting the following error and not sure why so wondered if anyone 
>>> has encountered this before:
>>> 
>>> ------------------------------------------------------
>>> 
>>> 
>>> ant -f 
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/jdbc 
>>> clean build
>>> Deleting directory 
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/build/windows-x86_64/depcache
>>> shared.clean:
>>> clean:
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/common/shared.xml:128:
>>>  warning: 'includeantruntime' was not set, defaulting to 
>>> build.sysclasspath=last; set to false for repeatable builds
>>> Compiling 96 source files to 
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/build/windows-x86_64/classes
>>> warning: [options] bootstrap class path not set in conjunction with -source 
>>> 1.5
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/src/share/classes/javax/sql/rowset/serial/SerialClob.java:148:
>>>  error: try-with-resources is not supported in -source 1.5
>>>        try (Reader charStream = clob.getCharacterStream()) {
>>>  (use -source 7 or higher to enable try-with-resources)
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java:370:
>>>  error: try-with-resources is not supported in -source 1.5
>>>                    try (FileInputStream fis = new 
>>> FileInputStream(ROWSET_PROPERTIES)) {
>>>  (use -source 7 or higher to enable try-with-resources)
>>> 2 errors
>>> 1 warning
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/common/shared.xml:170:
>>>  The following error occurred while executing this line:
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/common/shared.xml:155:
>>>  The following error occurred while executing this line:
>>> /Users/lance/Documents/hg-workspaces/jdk7/jdk7u-dev/jdk/make/netbeans/common/shared.xml:128:
>>>  Compile failed; see the compiler error output for details.
>>> BUILD FAILED (total time: 2 seconds)
>>> 
>>> ----------------------------------------
>>> 
>>> If I open the project properties in netbeans, it shows 1.7 source.  This is 
>>> with netbeans 7.3
>>> 
>>> Best
>>> Lance
>>> 
>>> 
>>> Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
>>> Oracle Java Engineering
>>> 1 Network Drive
>>> Burlington, MA 01803
>>> lance.ander...@oracle.com
>>> 
>>> 
>>> 
>>> 
>> 
> 
> 
> 
> 
> Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering 
> 1 Network Drive 
> Burlington, MA 01803
> lance.ander...@oracle.com
> 
> 
> 
> 




Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
lance.ander...@oracle.com




Reply via email to