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/jrubyRelated languages
LLM-contributed programs
Java Integration Example
Provenance: commit 2583f6ffb8 · authored 2026-02-10T20:53:32+01:00 · agent claude-code · model sonnet · WebSearch disabled
# 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.)