my Sublime Text javac build settings don't work for outputs like System.out.println statements in the main method.
I am using this sublime-build (javac):
{
"cmd": ["javac", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"working_dir": "${project_path:${file_path}}",
"variants": [
{
"name": "Run",
"cmd": ["java", "$file_name"],
"shell": true,
"env": {"CLASSPATH": "/path/to/jar/files:/path/to/more/jars"}
}
]
}
Changing "cmd" to
"cmd": ["javac \"$file_name\" && java \"$file_base_name\""]
won't work either. But it compiles correctly and has a correct output on my bash command line.
Any thoughts?
Thanks in advance!
Nevermind, I got it:
That's the magic line missing: