Next Previous Up Contents
Next: TOPCAT Windows
Up: Invoking TOPCAT
Previous: Tips for Large Tables

### 10.5 Examples

Here are some examples of invoking TOPCAT from the command line. In each case two forms are shown: one using the `topcat` script, and one using the jar file directly. In the latter case, the `java` command is assumed to be on the your path, and the jar file itself, assumed in directory `my/tcdir`, might be named `topcat.jar`, `topcat-full.jar`, or something else, but the form of the command is the same.

No arguments

          topcat
          java -jar topcat.jar

Output usage message

          topcat -h
          java -jar topcat.jar -h

Load a FITS file

          topcat testcat.fits
          java -jar my/tcdir/topcat.jar testcat.fits

Loading files of various formats

          topcat t1.fits -f ascii t2.txt t3.txt -f votable t4.xml
          java -jar my/tcdir/topcat.jar t1.fits -f ascii t2.txt t3.txt -f votable t4.xml

Use disk storage format and boosted heap memory

          topcat -Xmx256M -disk
          java -Xmx256M -jar my/tcdir/topcat.jar -disk

Make custom functions available

          topcat -classpath my/funcdir/funcs.jar -Djel.classes=my.ExtraFuncs t1.fits
          java -classpath my/tcdir/topcat.jar:my/funcdir/funcs.jar \
               -Djel.classes=func.ExtraFuncs \
               uk.ac.starlink.topcat.Driver t1.fits

Make PostgreSQL database connectivity available

          topcat -classpath my/jdbcdir/pg73jdbc3.jar -Djdbc.drivers=org.postgresql.Driver
          java -classpath my/tcdir/topcat.jar:my/jdbcdir/pg73jdbc3.jar \
               -Djdbc.drivers=org.postgresql.Driver uk.ac.starlink.topcat.Driver

Use custom I/O handlers

          topcat -classpath my/driverdir/drivers.jar \
                 -Dstartable.readers=my.MyTableBuilder \
                 -Dstartable.writers=my.MyTableWriter \
          java -classpath my/tcdir/topcat.jar:my/driverdir/drivers.jar \
               -Dstartable.readers=my.MyTableBuilder \
               -Dstartable.writers=my.MyTableWriter \
               uk.ac.starlink.topcat.Driver

The `-Dx=y` definitions can be avoided by putting equivalent `x=y` lines into the `.starjava.properties` in your home directory.

Next Previous Up Contents
Next: TOPCAT Windows
Up: Invoking TOPCAT
Previous: Tips for Large Tables

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@bristol.ac.uk