Sublime Text build Java running environment

Source: Internet
Author: User
Tags sublime text

Run Java program with sublime text, 1, build Java environment, add environment variable
2, create the batch process, using the following code to establish Runjava.bat @ECHO OFF

@ECHO OFF cd %~dp1 ECHO Compiling %~nx1....... IF EXIST %~n1.class ( DEL %~n1.class ) javac %~nx1 IF EXIST %~n1.class ( ECHO -----------OUTPUT----------- java %~n1 ) 把这个文件复制到JDK的bin文件夹下 3、打开sumlime text2,在选项卡Preferences > Browse Packages.. 打开sublime的包目录      转到Java Folder      打开 JavaC.sublime-build 替换下面的命令行"cmd": ["javac", "$file"],      用以下命令行替换"cmd": ["runJava.bat", "$file"], 4、编写一个测试代码,Ctrl+B运行如下

Sublime Text build Java running environment

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.