Skip to content

Instantly share code, notes, and snippets.

@rsrini7
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save rsrini7/cb0fc76604b577c48ffc to your computer and use it in GitHub Desktop.

Select an option

Save rsrini7/cb0fc76604b577c48ffc to your computer and use it in GitHub Desktop.
Javac and Java Sublime Build
#java.sublime-build (filename)
{
"cmd": ["javacr.bat","$file"]
}
#javacr.bat (filename - PATH env)
@ECHO OFF
set "classext=.class"
cd %~dp1
if exist %~n1%classext% (
del %~n1%classext%
)
D:\DevTools\Java8\jdk1.8.0_05\bin\javac %~nx1
if exist %~n1%classext% (
D:\DevTools\Java8\jdk1.8.0_05\bin\java %~n1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment