Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Forge Build Tool Extension For JavaNew to Visual Studio Code? Get it now.
Forge Build Tool Extension For Java

Forge Build Tool Extension For Java

FireSmasher

|
1 install
| (0) | Free
Fast Java build tool integration with Groovy & Kotlin DSL support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Forge Build Tool v1.2.9

Fast Java build tool with Groovy & Kotlin DSL support.

Quick Start

1. Extract the ZIP

Extract forge-1.2.9.zip to a location (e.g., C:\Program Files\forge)

2. Run the Installer (Windows)

cd forge
install.bat

Required: Run as Administrator

3. Restart Your Terminal

Close and reopen Command Prompt/PowerShell

4. Verify Installation

forge version

What Gets Installed

The installer sets two environment variables:

  1. FORGE_HOME - Points to your Forge installation directory
  2. PATH - Adds %FORGE_HOME%\bin so forge works globally

Manual Installation (Without Installer)

If you prefer to set environment variables manually:

  1. Set FORGE_HOME to your Forge directory:

    setx FORGE_HOME "C:\Program Files\forge"
    
  2. Add to PATH:

    setx PATH "%PATH%;%FORGE_HOME%\bin"
    
  3. Restart your terminal

Directory Structure

forge/
├── bin/                    # Scripts (add to PATH)
│   └── forge.cmd
├── lib/                    # JAR files
│   └── forger-1.2.9.jar
├── docs/
│   └── README.md          # This file
└── install.bat            # Installation script

Usage

Basic Commands

forge build       # Build the project
forge clean       # Remove build/ directory
forge resolve     # Show dependencies
forge version     # Show version
forge help        # Show help

Create a Build Config

Create build.forge or build.forge.kts in your project root:

Groovy DSL:

name = "MyProject"
version = "1.0.0"

dependencies {
    add "com.google.code.gson:gson:2.10.1"
    add "org.junit.jupiter:junit-jupiter-api:5.9.2"
}

repositories {
    add "https://repo.maven.apache.org/maven2"
}

Kotlin DSL (build.forge.kts):

name("MyProject")
version("1.0.0")

dependencies {
    add("com.google.code.gson:gson:2.10.1")
    add("org.junit.jupiter:junit-jupiter-api:5.9.2")
}

repositories {
    add("https://repo.maven.apache.org/maven2")
}

Project Structure

Forge expects this layout:

MyProject/
├── build.forge           # Your build config
├── src/
│   └── main/
│       └── java/         # Your Java source code
│           └── me/
│               └── example/
│                   └── Main.java
└── build/               # Generated by Forge
    ├── classes/         # Compiled files
    └── libs/            # Dependencies

Requirements

  • Java 21+ (OpenJDK recommended)
  • Windows 7+ or compatible

Install Java

Download OpenJDK 21 from: https://adoptium.net/

Then install and ensure java is in your PATH:

java -version

Environment Variables

FORGE_DEBUG

Enable debug output:

set FORGE_DEBUG=1
forge build

FORGE_HOME

Set to your Forge installation directory (automatic via installer):

echo %FORGE_HOME%

Troubleshooting

"forge is not recognized as an internal command"

  1. Verify FORGE_HOME is set:

    echo %FORGE_HOME%
    
  2. Verify bin is in PATH:

    echo %PATH%
    
  3. If not set, run installer again:

    %FORGE_HOME%\install.bat
    

"Java is not installed or not in PATH"

Install OpenJDK 21+: https://adoptium.net/

Verify Java works:

java -version
javac -version

Build fails with "No build.forge found"

Create a build.forge or build.forge.kts file in your project root. See examples above.

"Compiled 0 Java files"

Ensure your Java files are in: src/main/java/

Package structure must match directory structure:

package com.example;  →  src/main/java/com/example/ClassName.java

Uninstall

To remove Forge from your system:

  1. Delete the Forge directory
  2. Remove %FORGE_HOME%\bin from PATH:
    • Search: "Environment Variables"
    • Edit PATH and remove the Forge entry
  3. Delete the FORGE_HOME variable

License

Forge uses MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft