[prev] [up] [next]

Java Support - Tools

JUnit Integration

STX:LIBJAVA automatically recognizes JUnit test cases (and Mauve testlets too, but you aren't using those probably :) when loaded and makes them accessible from standard Smalltalk/X Test Runner. Create Junit 3 or JUnit 4 test case, compile it and load it into STX:LIBJAVA. Test Runner can be opened by selecting the button on Smalltalk Launcher.

You might use Java loadClassesIn: '/home/m/anyDirectory', which automatically adds that directory to the classpath and then loads all classes (therefore test cases too) in that directory into STX:LIBJAVA. Java must be initialized to use that method.

Groovy Workspace

Groovy is a dynamic language running on top of the Java, which syntax is backward compatible with Java. It includes an evaluator written in Java, which is used in Smalltalk/X workspace.You can evaluate any valid Groovy code in the workspace. Aren't we running Groovy code, which runs on Java, which runs on stx:libjava, which runs on Smalltalk/X, which is written in C?

Select Groovy from the workspace menu and insert arbitrary Groovy code (preferably magical 3 + 4), and hit alt+p to print the result or alt+d to do it.

Note: you can see Java in the menu too, but currently it uses Groovy. This is work in progress and dynamic (re)compilation of Java code is going to be a feature of stx:libjava very soon.

More to be written...


<info@exept.de> , <stxlibjava-dev@googlegroups.com>

CVS: $Id: java-tools.html,v 1.3 2013-09-06 00:41:43 vrany Exp $