The tutorial column of sublime below will introduce to you how to use sublime text3 to run Java programs. I hope it will be helpful to friends in need!
Since I don’t want to learn Java in the IDE, I want to use sublime for Java development, so there is the question of how to compile and run Java in sublime. .
I found many tutorials on the Internet, but I still couldn't output the results. Later I found out that it was due to a deviation in my understanding. (Write it down. When you read the article in the future, you must fully understand its content and meaning before you can act).
(1) First, find the sublime package folder and find the java.sublime-pakage compressed package in it:
(2) Use Open it with decompression software (emphasis on: not decompressing it directly) (I use 360 decompression):
(3) Write a JavaC.sublime-build file ( The suffix is sublime-build, the content is as follows):
{ "cmd": ["javac","-d",".","$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.java", "encoding":"cp936", //执行完上面的命令就结束 // 下面的命令需要按Ctrl+Shift+b来运行 "variants": [ { "name": "Run", "shell": true, "cmd" : ["start","cmd","/c", "java ${file_base_name} &echo. & pause"], //c是执行完命令后关闭cmd窗口, // /k是执行完命令后不关闭cmd窗口。 // echo. 相当于输入一个回车 // pause命令使cmd窗口按任意键后才关闭 "working_dir": "${file_path}", "encoding":"cp936" } ] }
(4) Add the written file to the java.sublime-pakage compressed package (just copy and paste it directly)
(5 ) Then reopen sublime, write the Java source file, and then press ctrl shift b. You can choose to compile or run. The results are as follows:
The above is the detailed content of Run Java programs using sublime text3. For more information, please follow other related articles on the PHP Chinese website!

ThemaindifferencesbetweenthepaidandunpaidversionsofSublimeTextaretheremovalofstatusbarremindersandoccasionalpop-uppromptsinthepaidversion.1)Unregisteredversion:fullyfunctionalwithallcorefeatureslikesyntaxhighlighting,codecompletion,andcommandpalette,

SublimeText is worth buying. 1) Its simple interface and powerful functions, such as multi-line editing and GotoAnything, improve development efficiency. 2) Rich plug-in ecosystem, such as Anaconda, enhances the development experience. 3) Although the price is $70, its performance and fluency are great value for professional developers.

SublimeText is loved by developers for its powerful code completion and syntax highlighting capabilities. 1) Code completion can automatically prompt function names, variable names, etc. to improve programming efficiency. 2) Syntax highlighting distinguishes code elements through different colors to improve readability and error detection speed.

SublimeTextisidealforthosevaluingspeedandsimplicity,whileVSCodesuitsthoseneedingextensivefeaturesandcustomization.SublimeTextoffersquickfileaccesswith"GotoAnything"andaminimalisticapproach,butmaylackout-of-the-boxfunctionality.VSCodeprovide

SublimeTextisapowerfulcodingcompanionduetoitsspeed,customization,andkeyfeatures.1)Itoffersincrediblespeedforhandlinglargefiles.2)Itsflexibilityallowsextensivecustomizationwithpluginsandthemes.3)Featureslikemultiplecursors,GotoAnything,CommandPalette,

SublimeText is more suitable for users who work with large files and prefer lightweight editors, while VSCode is more suitable for users who need IDE capabilities and powerful scalability. 1.SublimeText is known for its speed and simplicity, and is suitable for handling large files. 2.VSCode is known for its scalability and Microsoft support, and is suitable for users who need IDE capabilities.

SublimeText is a powerful and flexible code editor that is worthy of exploration by programmers. 1) It supports multiple selection and editing, allowing multiple locations to be modified at the same time. 2) The plug-in system is rich and extensible. 3) The basic usage is intuitive, and the advanced usage includes regular expressions and macros. 4) Common errors such as plug-in conflicts can be resolved by uninstalling or adjusting the configuration. 5) Performance optimization is achieved through management plug-ins and configuration files.

SublimeText is popular among developers for its fast, powerful and rich plug-in ecosystem. 1. Multi-line editing and multi-cursor functions allow multiple text modifications at the same time. 2. Command panel and shortcut keys improve operation efficiency. 3. Use PackageControl management plug-in to meet various development needs. SublimeText is ideal for developers to improve programming efficiency.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6
Visual web development tools

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Atom editor mac version download
The most popular open source editor
