Configuration of the Java Development environment under Windows sublime TEXT3

Source: Internet
Author: User
Tags sublime text

Configuration of the Java Development environment under Windows Sublime TEXT3:

1. Write the batch script Run.bat in the bin directory of the JDK, for example mine is placed in "D:\Java\bin".

Runbat content:

========== Start (The bank does not copy) =========

@ECHO OFF CD%~dp1 ECHO compiling%~nx1 .... If EXIST%~n1.class (DEL%~n1.class) javac-encoding UTF-8%~nx1 IF EXIST%~n1.class (ECHO-----------OUTPUT------ -----java%~n1)

============ End (Bank does not copy) ================


2.Sublime Text3 preferences--browse packages--user (My absolute path is: D:\Sublime Text Build 3126 x64\data\packages\user) Create a new Javac.sublime-build file in the folder with the following code:

========== starts (the bank does not copy) =========

{"cmd":  ["Javac", "-encoding", "UTF-8", "-D", ".", "$file"], "File_regex":  "^ (... *):( [0-9]*):? ([0-9]*) "," selector ": " Source.java "," Encoding ":" GBK ",//Finish the command above//  the following command needs to press CTRL+SHIFT+B to run" Variants ":    [        {              "name":  "Run",              "Shell": true,              "cmd"  :  ["Start", "cmd", "/C",  "Java ${file_base_name} &echo.  & pause "],            // / C is to close the cmd window after executing the command,             // / K does not close the cmd window after executing the command.             // echo.  equivalent to entering a carriage return         &nbsP;    // pause command causes the cmd window to press any key before closing               "Working_dir":  "${file_path}",              "encoding": "GBK"         }    ]}

============ End (Bank does not copy) ================


3. When running the code, press Ctrl+b to compile, but not in the console input, press CTRL+SHIFT+B, select Javac-run to bring up the Windows console, you can enter the console normally.


Configuration of the Java Development environment under Windows sublime TEXT3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.