You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2019/09/09 04:44:00 UTC
[jira] [Commented] (NETBEANS-3073) Can't get Console input with
Gradle project
[ https://issues.apache.org/jira/browse/NETBEANS-3073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16925353#comment-16925353 ]
Laszlo Kishalmi commented on NETBEANS-3073:
-------------------------------------------
Check the development versions, the support has already merged there. It is targeted to be released for 11.2
> Can't get Console input with Gradle project
> -------------------------------------------
>
> Key: NETBEANS-3073
> URL: https://issues.apache.org/jira/browse/NETBEANS-3073
> Project: NetBeans
> Issue Type: Bug
> Affects Versions: 11.1
> Environment: Windows 10 x64 version 1803
> Reporter: Vincent Hudry
> Priority: Major
>
> When trying to build a console application with Gradle in Netbeans, it can't get the user input.
> For example, running this code:
> {code:java}
> public class Main {
> public static void main(String[] args) {
> try(Scanner sc = new Scanner(System.in)){
> String s = sc.nextLine();
> System.out.println(s);
> }
> }
> }
> {code}
> result in the error
> {code:java}
> Exception in thread "main" java.util.NoSuchElementException: No line foundException in thread "main" java.util.NoSuchElementException: No line found at java.util.Scanner.nextLine(Scanner.java:1540) at test.Main.main(Main.java:21)
> {code}
> ---- * This happens when running the project from Netbeans (running it via java cli in terminal works)
> * The error happen before the user can enter anything in the "output" panel
> * The error happens on both JDK 1.8 and OpenJDK11 at least
> * The error only happen with Gradle projects, not with Ant projects
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists