[ https://issues.apache.org/jira/browse/NETBEANS-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17163482#comment-17163482 ]
Netbeans User 2019 commented on NETBEANS-4617: ---------------------------------------------- Strange > stdout not flushed to console until new line > --------------------------------------------- > > Key: NETBEANS-4617 > URL: https://issues.apache.org/jira/browse/NETBEANS-4617 > Project: NetBeans > Issue Type: Bug > Components: projects - Gradle > Affects Versions: 12.0 > Environment: Windows 10 > Reporter: Operaxis > Assignee: Laszlo Kishalmi > Priority: Major > > Similar (if not completely same) with: > [https://github.com/JetBrains/intellij-community/commit/707cf1427f66beb24faa5b8193217e52a8bb85d1] > issue. In IntelliJ IDEA case, a fix has been published for version 2020.1. > Can be used as reference. > Basically, printf() and print() does not work until a newline, not even > System.out.flush() will work. This only happens on Gradle projects, and when > running through the IDE (does not happen to Maven/Ant). This does not happen > to println() because it prints new line. > Quite a breaking stuff, impossible to accept user input on the same line > through the console. > As an example to demonstrate the issue: > {code:java} > public static void main(String[] args) { > Scanner in = new Scanner(System.in); > > System.out.print("Please enter ABC: "); > in.next(); > System.out.printf("DEF: "); > in.next(); > System.out.println("GHI: "); > in.next(); > } > {code} > Output: > {code:java} > JAVA_HOME="C:\Program Files\AdoptOpenJDK\jdk-14.0.1.7-hotspot" > cd C:\repo\test-cli; ./gradlew --configure-on-demand > -PrunClassName=Transaction.Transaction -x check runSingle > Configuration on demand is an incubating feature. > > Task :compileJava UP-TO-DATE > > Task :processResources NO-SOURCE > > Task :classes UP-TO-DATE> Task :runSingle > ABC > DEF > Please enter ABC: DEF: GHI: > GHI > BUILD SUCCESSFUL in 17s > 2 actionable tasks: 1 executed, 1 up-to-date > {code} > A fix would be very appreciated, thank you. > -- 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