STBC

STBC scheenshots

STBC, the SSCCE Text Based Compiler, is a simple tool for checking that Java code written in the form of an SSCCE is actually compilable!

System Requirements

STBC will run on any computer with a version 1.6+ Java Plug-In* JDK (AKA SDK).

* The API that STBC uses is merely a public interface to the compiler in the tools.jar that is distributed only with JDKs (though the 'public JRE' of the JDK also seems to acquire a tools.jar). This leads to some unusual requirements in running either the native jar, or the web start app.

Help & Configuration

See help & configuration for more details.

Download/Install

To download (or run) STBC, click the Download STBC button.

Download STBC

Run the Jar using the JRE of a JDK. Many development environments will already be correctly set-up to run STBC by 'double clicking' the jar. If not, it can be configured externally or at runtime.

To launch STBC using webstart, click the Launch STBC button.

Launch STBC

To work under webstart, STBC requires the JRE of an JDK. The path can be configured externally or at runtime.

Download Development Files

Download the source and build files by clicking Download Source.

Download Source

See Also...

  • The thread Example code for java compiler with a simple GUI at the Sun forums, for the basic source code (of this relatively simple tool). Feel free to report bugs or make suggestions on that thread.
  • As usual, the Mindprod site has a good overview of on the fly compilation, with some examples and many valuable links. This page is especially worthy of mention since on-the-fly compilation has been available for a long while, whereas the JavaCompiler interface was only introduced into the J2SE in Java 6.
  • JavaDocs of the javax.tools package and the classes used in this app.
    • javax.tools.ToolProvider. The docs for getSystemJavaCompiler() mention that it returns "the compiler provided with this platform or null if no compiler is provided", but do not make clear why it might be null, nor the fact that the compiler will not be available to applets or webstart apps.
    • javax.tools.JavaCompiler. The public interface to the Java compiler.
    • javax.tools.SimpleJavaFileObject. A subclass of this allows us to compile source code contained in a String. The code of the JavaSourceFromString is from the JavaDocs for the JavaCompiler.

SoftPedia Certified

Softpedia guarantees that STBC 1.0 is 100% CLEAN, which means it does not contain any form of malware, including spyware, viruses, trojans and backdoors.
© 2003-2011 by Andrew Thompson. All rights reserved.
Web hosting compliments of Java Web Hosting.
Java Web Hosting