You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Peter Ream <to...@gmail.com> on 2020/09/18 14:36:33 UTC
Java - System.out.print("Command: "); problem
I had a java program that worked in mood.fi’s plugin in netbeans. I tried
it in Netbeans 12.0, but it would not work. Here is an example that does
not work in Netbeans 12:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
System.out.print("Command: ");
String command = scanner.nextLine();
System.out.println("Bye bye!");
break;
}
}
}
}
I have prior versions of Netbeans lying around. I found this works up
through 11.1, but does not work in 11.3.
Any ideas?
Thank you.
Peter
Re: Java - System.out.print("Command: "); problem
Posted by Peter <to...@gmail.com>.
I started this without knowing how to access or reply.
This was introduced sometime after Maven 3.3.9 (after Netbeans 11.1). Running Netbeans 12.1 with Maven from Netbeans 11.1 is a work around.
On 2020/09/18 14:36:33, Peter Ream <to...@gmail.com> wrote:
> I had a java program that worked in mood.fi’s plugin in netbeans. I tried
> it in Netbeans 12.0, but it would not work. Here is an example that does
> not work in Netbeans 12:
>
> import java.util.Scanner;
>
> public class Main {
>
> public static void main(String[] args) {
>
> Scanner scanner = new Scanner(System.in);
> while (true) {
> System.out.print("Command: ");
> String command = scanner.nextLine();
> System.out.println("Bye bye!");
> break;
> }
> }
> }
> }
>
> I have prior versions of Netbeans lying around. I found this works up
> through 11.1, but does not work in 11.3.
>
> Any ideas?
>
> Thank you.
>
> Peter
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Java - System.out.print("Command: "); problem
Posted by Geertjan Wielenga <ge...@apache.org>.
What if you change print to println?
Gj
On Fri, 18 Sep 2020 at 16:40, Laszlo Kishalmi <la...@gmail.com>
wrote:
>
>
>
>
>
>
>
>
>
>
> What build system do you use for this example? If Gradle, the it
>
> would be supported in the 12.2 release only (the patch already
>
> available in the development builds).
>
>
>
>
> On 9/18/20 7:36 AM, Peter Ream wrote:
>
>
>
>
>
>
>
>
> I had a java program that worked in mood.fi’s plugin in netbeans. I tried
>
> it in Netbeans 12.0, but it would not work. Here is an example
>
> that does not work in Netbeans 12:
>
>
>
>
>
>
>
>
> import java.util.Scanner;
>
>
>
>
>
>
>
> public class Main {
>
>
>
>
>
>
>
> public static void main(String[] args) {
>
>
>
>
>
>
>
> Scanner scanner = new Scanner(System.in);
>
>
> while (true) {
>
>
> System.out.print("Command: ");
>
>
> String command = scanner.nextLine();
>
>
> System.out.println("Bye bye!");
>
>
> break;
>
>
> }
>
>
> }
>
>
> }
>
>
> }
>
>
>
>
>
>
>
> I have prior versions of Netbeans lying around. I found
>
> this works up through 11.1, but does not work in 11.3.
>
>
>
>
>
>
>
> Any ideas?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank you.
>
>
>
>
>
>
>
> Peter
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Re: Java - System.out.print("Command: "); problem
Posted by Laszlo Kishalmi <la...@gmail.com>.
What build system do you use for this example? If Gradle, the it would
be supported in the 12.2 release only (the patch already available in
the development builds).
On 9/18/20 7:36 AM, Peter Ream wrote:
> I had a java program that worked in mood.fi <http://mood.fi>’s plugin
> in netbeans. I tried it in Netbeans 12.0, but it would not work. Here
> is an example that does not work in Netbeans 12:
>
> import java.util.Scanner;
>
> public class Main {
>
> public static void main(String[] args) {
>
> Scanner scanner = new Scanner(System.in);
> while (true) {
> System.out.print("Command: ");
> String command = scanner.nextLine();
> System.out.println("Bye bye!");
> break;
> }
> }
> }
> }
>
> I have prior versions of Netbeans lying around. I found this works up
> through 11.1, but does not work in 11.3.
>
> Any ideas?
>
> Thank you.
>
> Peter