Installing and Configuring Sublime Text for Java Development with Chinese Localization

Download and Installation

Visit https://www.sublimetext.com/ and select the Windows version to download. Complete the installation process by following the on-screen instructions.

Chinese Language Localization

After launching Sublime Text:

  1. Navigate to Tools → Install Package Control
  2. Access Preferences → Package Control
  3. In the search interface, type 'Install Package' and execute
  4. Once loaded, search for 'chinese' and select the first result
  5. Wait briefly for the language pack to install

Lightweight Java Development Setup

This configuration supports basic code execution suitable for practice sessions.

  1. Locate the Packages directory within your Sublime Text installation folder and find the Java.sublime-package file
  2. Right-click → Open With → Extract to (use any archive tool like Bandzip)
  3. Within the extracted files, locate JavaC.sublime-build and copy it to your desktop for editing

Open the file and replace its contents with the following build configuration:

{
    "cmd": ["javac", "$file_name", "&&", "start","cmd", "/k", "java", "$file_base_name"],
    "shell": true,
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "working_dir": "$file_path",
    "selector": "source.java",
    "encoding": "GBK",
    "variants": [
        {
            "name": "Terminal",
            "cmd": ["javac", "$file_name", "&&", "start","cmd", "/k", "java", "$file_base_name"],
            "shell_cmd": "",
        },
        {
            "name": "Build",
            "quiet": true,
            "shell_cmd": "javac $file_name && java $file_base_name && del $file_base_name.class",
        }
    ]
}

Save the modified file back to its original location, replacing the existing one. Restart Sublime Text too apply changes.

Test the setup by creating a new file named HelloWorld.java with the following content:

public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World!");
    }
}

Compile and run using Ctrl+B shortcut.

Tags: sublime text Java Development ide setup programming environment

Posted on Tue, 03 Nov 2026 16:20:09 +0000 by just_nobody