I'm working with Sublime Text 3 to compile java, however when I create classes that need data entry by keyboard, the sublime text console only lets write but when I press the ENTER key, nothing happens, it's as if the program will never read the return or line break, so you never know where the text string ends.
This is my Java BuildSystem configuration
{
"cmd": ["javac", "$file_name","&&","java", "$file_base_name"],
"file_regex": "^(...?):([0-9]):?([0-9]*)",
"selector": "source.java",
"shell": true
}
The program compiles correctly, but does not recognize the end of the text string when entering it in the ST3 shell, how can I solve this?
This is the code I'm trying to compile
import java.io.*;
class saludar{
public static void main (String [] args){
BufferedReader inp = new BufferedReader (new InputStreamReader (System.in));
String nombre = "";
System.out.print("Nombre: ");
try{
nombre = inp.readLine();
System.out.println("Hola " + nombre);
}catch (IOException e){
System.out.println("Error");
}
}
}
As I mentioned, you only receive everything you type on the keyboard, but the ENTER key only adds a line break, instead of the data entry completion