boxlang-runtime-jsr-223listed
Install: claude install-skill ortus-boxlang/skills
# BoxLang JSR-223 Scripting
## Overview
JSR-223 ("Scripting for the Java Platform") allows Java applications to embed
BoxLang as a scripting engine. This enables dynamic business logic, configurable
rules, template processing, and runtime extensibility without a full recompile.
---
## Dependencies
### Maven
```xml
<dependency>
<groupId>io.boxlang</groupId>
<artifactId>boxlang</artifactId>
<version>1.10.1</version>
</dependency>
```
### Gradle
```groovy
dependencies {
implementation 'io.boxlang:boxlang:1.10.1'
}
```
**Requirement:** Java 21+
---
## Quick Start
```java
import javax.script.*;
// Get BoxLang engine by name
ScriptEngine engine = new ScriptEngineManager().getEngineByName( "BoxLang" );
// Execute BoxLang code
Object result = engine.eval( "return 'Hello from BoxLang!'" );
System.out.println( result ); // Hello from BoxLang!
```
---
## Passing Data to BoxLang
Use `Bindings` to pass Java objects into the BoxLang execution context:
```java
ScriptEngine engine = new ScriptEngineManager().getEngineByName( "BoxLang" );
Bindings bindings = engine.createBindings();
bindings.put( "name", "Java Developer" );
bindings.put( "items", java.util.Arrays.asList( "Spring", "Maven", "BoxLang" ) );
Object result = engine.eval( """
message = "Hello " & name & "!"
itemCount = items.len()
return {
greeting: message,
totalItems: itemCount,
technologies: items.map( ( item ) => item.uCase() )
}
""", bindings )