[ 
https://issues.apache.org/jira/browse/NETBEANS-3164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16938294#comment-16938294
 ] 

ARUNAVA SINHA commented on NETBEANS-3164:
-----------------------------------------

If Someone runs NB with jdk-13 but Source/Binary format id JDK-8 then he will 
encounter below error:

 String str = """
 hello""";

text blocks are not supported in -source 8
 (use -source 13 or higher to enable text blocks)

';' expected
----
(Alt-Enter shows hints)

 

Also auto-completion of triple quotes will work only if Source/Binary format id 
JDK-13 and NB is running in JDK-13

 

In project.properties, you need to set below to be able to run and compile the 
project.

javac.compilerargs=\ --enable-preview

run.jvmargs=\ --enable-preview

 

So to use Text Block , NB should run with JDK-13 and   Source/Binary format  
should be JDK-13.

Also need to add --enable-preview flag in run/compiler argument. No need to do 
this manually, there is a hint Enable Preview who will do this job.

 

  

> JDK 13 preview feature not working correctly in 11.2beta1
> ---------------------------------------------------------
>
>                 Key: NETBEANS-3164
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3164
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 11.2
>         Environment: Windows 10
> OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13+33, mixed mode, sharing)
> Product Version: Apache NetBeans IDE 11.2-beta1
> Java: 11.0.4; OpenJDK 64-Bit Server VM 11.0.4+11
> Runtime: OpenJDK Runtime Environment 11.0.4+11
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\grafbe\AppData\Roaming\NetBeans\11.2-beta1
> Cache directory: C:\Users\grafbe\AppData\Local\NetBeans\Cache\11.2-beta1
>            Reporter: Benjamin Graf
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>         Attachments: image-2019-09-25-20-13-45-510.png
>
>
> Try to build a simple ant based project with a multiline String.
> !image-2019-09-25-20-13-45-510.png|width=500!
>  
> Reproduce:
>  * Install beta1 from zip with fresh profile
>  * Install latest nb-javac 1.7
>  * Create new ant based Java project
>  * Add multiline String and enable preview via hint (--enable-preview)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to