---
name: "jcomp"
section: "1"
platform: "linux"
package: "bock"
version: "0.20.2.6"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/jcomp"
---

# jcomp(1)

compile source code in a Java(tm)-like language

## NAME

jcomp - compile source code in a Java(tm)-like language

## SYNOPSIS

**jcomp** \[**-O**\] \[**-E**\] \[**-s** *start-class*\] \[**-o** *output-file*\] *java-file*...

## DESCRIPTION

**jcomp** reads all the *java-file*s specified on its command line, parses them as source code in a language which is a subset of the Java(tm) language, and generates a native binary in *output-file*.

Please note that **jcomp** internally makes use of [**bock**(1)](/bock/1.md), and is therefore **not** meant as a production compiler.

## OPTIONS

Options must be given in tha same order they are described here, and before any *java-file*s.

- \-O

  Indicates that the C compiler's optimisation should be turned on.

- \-E

  Indicates that the program should not be compiled into a binary; instead, the intermediate C code will be written to standard output.

- \-s

  Specifies the name of the class whose **main()** function should be called when the program is run.

- \-o

  Specifies which file to write generated native program to.  If not specified, **jcomp** writes to the file *j.out*.

## FILES

- */usr/share/bock/lib/\**

  A subset of the standard Java library, included automatically by jcomp.

## SEE ALSO

The forthcoming **Jackal** compiler for the Java(tm) language.

[**bock**(1)](/bock/1.md), */usr/doc/bock/\**.

## DIAGNOSTICS

If **jcomp** detects an error or a construct it cannot compile, it writes a message to its standard error output and terminates with a non-zero exit code.  There are many errors which **jcomp** does not detect.

## BUGS

See the [**bock**(1)](/bock/1.md) man page and */usr/doc/bock/BUGS* for details.

## AUTHOR

**jcomp** was written by Charles Briscoe-Smith.  I own the copyright to this program and its accompanying documentation.  Please see the file /usr/doc/bock/copyright for more information.

"Java", "Sun" and "Sun Microsystems" are trademarks or registered trademarks of Sun Microsystems, Inc. See the [**bock**(1)](/bock/1.md) man page for more details.
