You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/08/31 16:15:35 UTC

[GitHub] dukescript opened a new pull request #824: Enable source=1.8 for Java Frontend Web Application

dukescript opened a new pull request #824: Enable source=1.8 for Java Frontend Web Application
URL: https://github.com/apache/incubator-netbeans/pull/824
 
 
   Apache NetBeans 9.0 provides **Java Frontend Application** which can be deployed to desktop, Android, iOS and also Web. When compiling for web, only a subset of JDK8 APIs is available. To make sure the IDE and the runtime agree on the same classes, it is useful to configure compiler plugin like this:
   ```xml
           <maven.compiler.source>1.8</maven.compiler.source>
           <maven.compiler.target>1.8</maven.compiler.target>
       </properties>
       <build>
           <plugins>
               <plugin>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-compiler-plugin</artifactId>
                   <version>3.8.0</version>
                   <configuration>
                       <compilerArguments>
                           <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
                       </compilerArguments>
                   </configuration>
               </plugin>
   ```
   Then `rt.jar` is ignored and only libraries from dependencies are placed on `javac` compilation paths. However in such mode the IDE complains that lamda functions aren't supported. This is what appears in the log file:
   ```
   Even though the source level of code/src/main/resources is set to: 1.8, 
   java.util.stream.Streams cannot be found on the bootclasspath: 
   incubator-netbeans/netbeans.ignore.jdk.bootclasspath
   Changing source level to 1.7
   ```
   That is correct - `Streams` class isn't present in the web emulation layer. However that should not be a reason for disabling 1.8 features. All that is needed is presence of `LambdaMetafactory` and then support for lamda functions may remain on.
   
   This PR changes the detection system.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists