Broken console in Maven project using Netbeans
Posted
by Maciek Sawicki
on Stack Overflow
See other posts from Stack Overflow
or by Maciek Sawicki
Published on 2010-06-14T06:33:56Z
Indexed on
2010/06/14
8:42 UTC
Read the original article
Hit count: 272
Hi, I have strange problem with my Neatens+Maven installation. This is the shortest code to reproduce the problem:
public class App
{
public static void main( String[] args )
{
// Create a scanner to read from keyboard
Scanner scanner = new Scanner (System.in);
Scanner s= new Scanner(System.in);
String param= s.next();
System.out.println(param);
}
}
When I'm running it as Maven Project inside Netbeans console seems to be broken. It just ignores my input. It's look like infinitive loop in System.out.println(param);
.
However this project works fine when it's compiled as "Java Aplication" project. It also works O.K. if I build and run it from cmd.
System info: Os: Vista IDE: Netbeans 6.8 Maven: apache-maven-2.2.1
//edit
Built program (using mavean from Netbeans) works fine. I just can't test it using Net beans.
And I think I forgot to ask the question ;). So of course my first question is: how can I fix this problem?
And second is: Is it any workaround for this? For example configuring Netbeans to run external commend line app instead of using built in console.
© Stack Overflow or respective owner