![]() Step 3Ĭreate or open a Java file and press Ctrl B to build and execute the Java program. I have modified the value for " cmd" key and changed it to first compile and build the Java program with the "javac" executable, then to run it with "Java" executable. Navigate to Java Folder->JavaC.sublime-build Note: The SETX command will truncate the path to 1024 characters, so it could be destructive.įollow as directed in the screenshot below:Ĭustomize Sublime's build configuration for Java: My javac executable was located in: C:\Program Files\Java\jdk1.8.0_20\ Open "Command Prompt" with administrator rights i.e "Run as administrator".Įxecute the following command: SETX /M PATH "%PATH% C:\Program Files\Java\jdk1.8.0_20\bin" You can download it from this link: JDK8 Step 1Īdd the directory that contains your " javac" executable to " PATH" environment variable: ![]() Sublime Text 2 Compile and Execute Java From Sublime Text 2:Īssuming JDK to be installed, otherise you need to download that first. Note: The instructions below are based on Windows environment, but are adaptable for Mac/Linux environments.
0 Comments
Leave a Reply. |