netbeans and openjdk

huizhe wang huizhe.wang at oracle.com
Mon Mar 25 21:12:55 UTC 2013


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.

-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.Andersen at oracle.com
>
>
>
>




More information about the build-dev mailing list