[SOLUTION]
I have recently found the solution suiting to my needs, so here’s a step by step :
- Install Package Control if you haven’t already
- Install Terminus
2.1. To do so open the palette, press ctrl + shift + p (Win, Linux) or cmd + shift + p (Mac)
2.2 Type inPackage Controll: InstalThis text will be hiddenl Packagethen select with enter
2.3 Type in Terminus then select with enter - In the top menu bar go to Tools > Build Systems > New Build System
- It should have opened a new file untitled.sublime-build, erase all its content and paste :
{
“target”: “terminus_exec”,
“cancel”: “terminus_cancel_build”,
“shell_cmd”: “javac $file && java $file_base_name”
} - Save this file under any name like : RunJava.sublime-build
- Now to compile and execute you just have to go to the top menu bar again, go to Tools > Build Systems, and select the build system RunJava. Then with cmd+B (mac) or crtl+B (win) it should open a console within Sublime Text 3 where the result of your code is displayed, and best of all, u can use input with this console !
- Celebrate !