Some summary of Java programming using sublime Text 3

Source: Internet
Author: User
Tags sublime text



Forest Wood Blog Website: http://blog.csdn.net/wolinxuebin



1. Implement sublime Text 3 to Java compilation execution


Reference URL: http://tieba.baidu.com/p/2609515186

< Span style= "FONT-SIZE:14PX; line-height:26px ">1.1 found directly under the installation path *\packages\ Java.sublime-package file, open with the decompression software, find the Javac.sublime-build file, change the Javac in Shell_cmd to Javarun, save the original compressed file after the replacement, if you sublime Text 3 is already open and will be error-closed after overwriting again. The code is as follows:

{
	"shell_cmd": "javaRun \"$file\"",
	"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
	"selector": "source.java",
    "encoding":"cp936"
}



1.2 Then create a new Javarun.bat batch file in the Bin directory under the JDK installation path, with the following content:




@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
)







You can use it after 1.3. ctrl+b


2, if the display compilation display [Decode error-output not Utf-8]



Sublimetext3\packages\java.sublime-package\javac.sublime-build\



3, compile display: encoding GBK characters





Used: http://jingyan.baidu.com/article/ca2d939dc76c89eb6c31ce96.html



Open with Notepad and save as ansi code, but still feel uncomfortable, so there are the following methods:


<pre name="code" class="plain">
Change the above, javaRun.bat to:
@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
)




Some summary of Java programming using sublime Text 3


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.