A few more minutes of searching and I found this in the Eclipse documentation, under the section "Running the Batch Compiler":
java -jar org.eclipse.jdt.core_3.4.0<qualifier>.jar -classpath rt.jar A.java
or:
java -jar ecj.jar -classpath rt.jar A.java
I also found this Q/A on how to build an entire Eclipse project from the command line, which contains some of the same information, but since it didn't show up in my initial search I'm leaving this question open.
(And about 2 sec before I was going to click "Post Your Answer", Jon Skeet's reply popped up.)
The exact syntax that worked for me (Sun JRE is in the Windows PATH, Eclipse version is Galileo build 20100218-1602):
java -jar "C:\Program Files\eclipse\plugins\org.eclipse.jdt.core_3.5.2.v_981_R35x.jar" test.java
I omitted the -classpath rt.jar
and it still worked. Couldn't find the 'ecj.jar' file in this build.
It seems that the specific instructions for this do change from release to release, so caveat coder.