2

Can anyone say if Apache NetBeans 9.0 support java 11 and if so what are the requirements to make that work?

Prensently I can compile and run java 11 code in NetBeans 9.9 but it is underlined with red and the error message is "cannot find symbol ...".

Below is the pom.xml file I use:

   <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>

        <groupId>IoTlite</groupId>
        <artifactId>ioTlite</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>jar</packaging>

        <name>ioTlite</name>
        <description>ioTlite backend project with Spring Boot</description>

        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.1.0.RC1</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>

        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            <java.version>11</java.version>
        </properties>

        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>

            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.restdocs</groupId>
                <artifactId>spring-restdocs-mockmvc</artifactId>
                <scope>test</scope>
            </dependency>
        </dependencies>

        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>10</source>
                        <target>10</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>

    </project>

How, for example pom-file should be changed?

4
  • I think you need NetBeans 10 for that. The current "vote candidate" (pretty much the same as a "release candidate") can be downloaded here: dist.apache.org/repos/dist/dev/incubator/netbeans/… Commented Dec 3, 2018 at 13:13
  • Did you install the "nbjavac" plugin in NetBeans 9? Commented Dec 3, 2018 at 13:14
  • 1
    I installed NetBeans 10, and yes, indeed, the issue is gone now - so the issue solved, thank you! Commented Dec 3, 2018 at 13:53
  • The Netbeans 9.0 web site states Java 9 and 10 Support, so support for Java 11 is conspicuous in its absence. NetBeans 9.0 was released prior to the release of Java 11. Commented Dec 3, 2018 at 15:16

2 Answers 2

3

No NetBeans 9 doesn’t support Java 11 (only 9 and 10) [1].

NetBeans 10 which was planned to be released in November [2] will support Java 11 [3]. Unfortunately, it’s not available yet (at least as official release).

The latest release candidate can be downloaded here

https://dist.apache.org/repos/dist/dev/incubator/netbeans/incubating-netbeans/

As NetBeans 10 latest vote candidate 5 is in the final release vote stage [4] we should expect a final release within the next days.

Sign up to request clarification or add additional context in comments.

Comments

3

NetBeans 10 has been released with JDK 11 support:

JDK 11 Support

JDK 11 support has been enhanced in the following ways:

  • Integration with the nb-javac project, adding support for JDK 11.

  • Removed the CORBA modules.

  • Support for JEP 309, Dynamic Class-File Constants.

  • Support for JEP 323, Local-Variable Syntax for Lambda Parameters.

  • Support for LVTI Support for Lamdba Parameters

  • New Hint to convert variable type to 'var' for lambda parameters(JDK 11 and above)

  • Code completion for var lambda parameters

  • Code completion support for var type lambda parameters.(JDK 11 and above)

See the JDK 11 Confluence Page for more detailed features.

Donwload page: https://netbeans.apache.org/download/nb100/nb100.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.