Salinas

A modern xBase environment for Java.

  • Java
  • xBase
  • DBF

Decades of business software were written in dBase, Clipper and FoxPro, and a surprising amount of it still runs. Salinas brings that world to modern Java: a scripting engine for xBase-style languages, a terminal desktop for working with data, and a data engine that reads and writes DBF files directly.

The Salinas engine plugs into any Java application through the standard JSR-223 scripting API. The Salinas desktop adds a command window, table browser, field editor and code editor in the terminal.

Salinas — Command windowxBase session
. USE customers
. ? "Hello from Salinas"
Hello from Salinas
. LIST
Record# NAME CITY
----------------------------------------
1 Mission Bakery San Francisco
2 Harbor Hardware Monterey
3 Bayside Florist Santa Cruz
4 Valley Feed Salinas
. GOTO 4
. REPLACE CITY WITH "Watsonville"
. DISPLAY
Record# 4
NAME : Valley Feed
CITY : Watsonville
. INDEX ON NAME TO names
. BROWSE
NAMECITY
Mission BakerySan Francisco
Harbor HardwareMonterey
Bayside FloristSanta Cruz
Valley FeedWatsonville
.
Illustrative output · real commands
Reading a DBF file with jdbfDriver
DBF dbf = DBF.use("customers.dbf");
while (!dbf.eof()) {
    System.out.println(dbf.getString("NAME"));
    dbf.skip();
}
dbf.close();

// Run an xBase program through JSR-223
ScriptEngine engine = new ScriptEngineManager().getEngineByName("xbase");
engine.eval(new FileReader("report.prg"));