boxlang-java-integration

Enable BoxLang programs to create Java objects, call static methods, and convert types.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-java-integration-ortus-boxlang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-java-integration
Source: https://github.com/ortus-boxlang/skills/tree/main/boxlang-developer/java-integration
Command: npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-java-integration-ortus-boxlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bridges BoxLang and Java by enabling direct object creation, static method calls, and seamless type conversions so BoxLang code can leverage Java libraries natively.

Core Features & Use Cases

  • Object creation and static calls with Java classes using new java: syntax or createObject
  • Importing Java classes for concise, repeated use and clean code
  • Type conversion between BoxLang and Java types with automatic coercion
  • Passing BoxLang closures as Java functional interfaces
  • Loading Java libraries via JARs and module paths, and using JSR-223 scripting within BoxLang
  • Real-world use cases include invoking Java APIs, using third-party libraries, and scripting Java-backed logic from BoxLang

Quick Start

Begin by importing Java classes or using the new java: syntax to instantiate and call Java APIs from BoxLang.

Frequently Asked Questions about boxlang-java-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Java methods from BoxLang?

You can call Java methods from BoxLang by instantiating classes with the new java: syntax or createObject, then directly invoking their instance or static method APIs.

What is the best way to import Java classes into BoxLang code?

Importing Java classes into BoxLang allows you to reference them concisely for repeated use, enabling clean code while supporting direct object creation and static method calls.

Can I pass BoxLang closures as Java functional interfaces?

Yes, BoxLang supports passing closures as Java functional interfaces, automatically handling the type conversions needed to pass them directly into Java API methods.

Does BoxLang support JSR-223 scripting for Java interoperability?

Yes, BoxLang supports JSR-223 scripting within its environment, allowing you to script Java-backed logic and execute cross-language invocations natively.

How do I load external Java JAR libraries in BoxLang?

You load external Java JAR libraries in BoxLang by specifying JARs and module paths, making third-party Java libraries natively available for object creation.

Why do I need automatic type conversion between BoxLang and Java?

Automatic type conversion is needed to seamlessly coerce data structures between BoxLang and Java, ensuring objects and variables map correctly during cross-language invocation.