Run java file from Sublime Text 2

After download java SDK, we need to configure javaC.sublime-build (Sublime Text 2 -> Preferences -> Browse Packages).
Github has gist just for it:

{
 "cmd": ["javac", "$file_name"],
 "cmd": ["java", "$file_base_name"],
 "working_dir": "${project_path:${folder}}",
 "selector": "source.java"
 }

or

{
 "cmd": ["javac", "$file_name", "&&", "java", "$file_base_name"],
 ...
 }

But since cmd takes only one argument, this cases should be appended by shell scripts  of different complexity for parsing multiple arguments. To avoid this, we change the first line and add a line which make us treat all commands as shell instructions:

{
"cmd": ["javac $file_name && java $file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.java",
"shell": true
}