JRuby

1 program Added 2026-02-10T19:52:40Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 2583f6ffb8 · authored 2026-02-10T20:53:32+01:00 · agent claude-code · model sonnet

Sources mentioning this language

2 sources · pl_id: pl/jruby
LLM (this repo) · 1Pldb

Related languages

mruby (0.40)IronRuby (0.31)Diby (0.18)Goby (0.18)Moby (0.18)

LLM-contributed programs

Java Integration Example

Provenance: commit 2583f6ffb8 · authored 2026-02-10T20:53:32+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.rb · added: 2026-02-10T19:52:40Z
# JRuby example demonstrating Java integration
require 'java'

java_import 'java.util.ArrayList'
java_import 'java.util.HashMap'

# Create Java ArrayList
list = ArrayList.new
list.add("Hello")
list.add("from")
list.add("JRuby")

# Create Java HashMap
map = HashMap.new
map.put("language", "JRuby")
map.put("platform", "JVM")

# Iterate through ArrayList
puts "ArrayList contents:"
list.each { |item| puts "  #{item}" }

# Access HashMap
puts "\nHashMap contents:"
map.each { |key, value| puts "  #{key}: #{value}" }

# Call Java String methods
str = "jruby".to_java_string
puts "\nUppercase: #{str.toUpperCase}"

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about JRuby (mapped to pl/jruby). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/JRuby/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← JRT JSCall →