Set current language without saving file in Sublime Text
Click the Plain Text label at the bottom right of the window and select your language.
Alternatively, select your language in the menu at View » Syntax, or open your command palette (CtrlShiftP) and type ssjava
(equals to Set Syntax: Java
).