[BLUEJ-562] BlueJ console new line delimiter is always "\n"
Regardless the operating system used, BlueJ console always uses "\n" as new line caharacter. The expected behaviour is to use the same new line delimiter as the host operating system.
The following code runs on Linux, but fails on Windows: {code:java} import java.util.Scanner;
public class X { public String getName() { String name = null;
Scanner sc = new Scanner(System.in);
sc.useDelimiter(System.getProperty("line.separator"));
System.out.print("Type your name : ");
name = sc.next(); // <=== stall here
System.out.println("Your name is " + name);
return name;
}
} {code}
Issue metadata
- Issue type: Bug
- Priority: Low