RingJava
Call any Java class from Ring with simple syntax: the Java class library, your own jars and the packages of Maven Central. Build Swing and JavaFX windows, databases with JDBC and web servers โ all in Ring.
181Packages
4,106Ring classes
28Tutorials
17Swing samples
47Applications
20Maven packages tried
27Test files
A first taste#
load "java.ring"
using {
"java.lang"
"java.util"
}
? Math.max(3,9) # 9: a static method
oSB = new StringBuilder("Hello")
oSB.append(", Ring!")
? oSB.toString() # Hello, Ring!
? oSB.length() # 12
oList = new ArrayList
oList.add("pear")
oList.add("apple")
Collections = new Collections
Collections.sort(oList)
? oList.toString() # [apple, pear]The classes are real Ring classes with the same method names as the Java ones, so inheritance and ordinary Ring syntax just work. The JVM runs inside the Ring process, so a call costs microseconds and there is no server to start.
What is inside#
๐
Tutorials28 lessons, from a first look to a web server and a JSON API. Each one has a program with its real output.
๐
Simple syntaxoObj.method(), static members, fields, using a package, and a Ring function wherever Java wants a listener.
๐
The class libraryStrings, collections, dates, files, regex, networking, crypto, XML, JSON and more: 4,106 classes of 181 packages.
๐
QueriesjQuery: filter, sort, group and total a Ring list or a Java collection in one chain.
๐
Callbacks and threadsPass Ring code wherever Java expects an interface; run executors and wait for them.
๐ช
Swing and AWTEvery control and event of Swing, with short builders: jWindow, jButton, jRow, jGrid, JCanvas.
๐
Charts and drawingJChart: bar, line, scatter and pie charts; arcs, polygons and pictures on a JCanvas.
๐จ
JavaFXJavaFX windows from Ring: scenes, controls and animation.
๐๏ธ
DatabasesJDBC with H2 and SQLite, and JavaDatabase: tables, rows and queries without SQL.
๐
Web serverJavaWebServer: routes that are Ring functions, forms, JSON in one call, and jHttpGet for a client.
๐ฆ
Maven packagesjMaven downloads any package of Maven Central with its dependencies: 20 of them are tried for real.
๐
Class referenceEvery Java class that has a Ring class: constructors, fields and methods with their Ring calls.
๐ฎ
47 applicationsCalculator, Notepad, Paint, Tetris, Sudoku, Minesweeper and more โ each tests itself.
See it running#
How the documentation is organized#
| Part | What it is for |
|---|---|
| Start | Overview, Getting started (install, the JDK, the first programs), Installing and distributing, Core concepts and How it works |
| Tutorials | learning by building programs: 28 lessons from a first look to a web server, each with its program and real output |
| Using Java | how each area works and which functions and classes it has: the core API, queries, callbacks and threads, windows and events, window builders and charts and drawing |
| Samples | the applications, the samples and the galleries with a screenshot, the source and the command of every window: applications, Swing and JavaFX |
| The Java ecosystem | Maven packages and the packages tried, databases, the web server and JavaFX |
| Inside | the rules and limits to read before a long program, the generator and testing |
| Reference | the function index and the class reference with every Java class that has a Ring class |
| Appendix | a quick introduction to Ring, for readers who are new to the language, and troubleshooting |
How the package is organized#
| Folder | Contents |
|---|---|
bin/ | ring_java.dll, ringjava.jar and load/java.ring (what load "java.ring" finds) |
libraries/javalib/ | The Ring library: functions, the builders, and generated/: the Ring classes of 181 Java packages |
extensions/ringjava/ | C source of the extension (ring_java.c) and the Java source of the bridge, with the build scripts |
tools/javatools/ | The generator GenRing.java and its manifest, and checkgenerated.ring |
samples/UsingJava/tutorials/ | The program of each tutorial, named by chapter (ch01_first_look.ring ...) |
samples/UsingJava/introduction/ | Short samples for each area |
samples/UsingJava/gui/ and ecosystem/ | Swing windows; Maven packages, JDBC and JavaFX |
samples/UsingJava/applications/ | 47 complete programs, each in its own folder with a self test |
samples/UsingJava/tests/ | The automated tests (run.ps1, run.sh) |
docs/ | docproject.ring and the manual: docs/src is the Markdown, docs/site is the built site |



